Skip to content

Commit 16bbbf5

Browse files
committed
luminal cuda fixes
1 parent 99c988a commit 16bbbf5

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

crates/luminal_cuda/src/block/interpreter.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <device_atomic_functions.h>
1+
#include <device_atomic_functions.h> // need this for nanosleep
22
enum OpCode {
33
//%extra_op_codes%
44
};

crates/luminal_cuda/src/runtime.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ use crate::{
22
block::{BlockOp, IntoBlockOp},
33
kernel::KernelOp,
44
};
5-
use cudarc::driver::{
6-
CudaContext, CudaFunction, CudaSlice, CudaStream, DevicePtr, DevicePtrMut, DeviceRepr,
7-
LaunchConfig, PushKernelArg, ValidAsZeroBits,
5+
use cudarc::{
6+
driver::{
7+
CudaContext, CudaFunction, CudaSlice, CudaStream, DevicePtr, DevicePtrMut, DeviceRepr,
8+
LaunchConfig, PushKernelArg, ValidAsZeroBits,
9+
},
10+
nvrtc::{compile_ptx_with_opts, CompileOptions},
811
};
9-
use cudarc::nvrtc::{compile_ptx_with_opts, CompileOptions};
1012
use fixedbitset::FixedBitSet;
1113
use itertools::Itertools;
1214
use luminal::op::Output;

src/egglog.egg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@
124124
(= ?n_elems (n_elements ?other))
125125
)
126126
(
127-
(union ?e (ECons (MMul (MIter) ?n_elems) (RowMajor ?other)))
127+
(union ?e (ECons ?n_elems (RowMajor ?other)))
128128
)
129129
:ruleset expr
130130
)
131-
(rewrite (RowMajor (ECons ?dim (ENil))) (ECons (MIter) (ENil)) :ruleset expr)
131+
(rewrite (RowMajor (ECons ?dim (ENil))) (ECons (MNum 1) (ENil)) :ruleset expr)
132132

133133
(rewrite (MReplaceList (ECons ?expr ?list) ?from ?to) (ECons (MReplace ?expr ?from ?to) (MReplaceList ?list ?from ?to)) :ruleset expr)
134134
(rule

0 commit comments

Comments
 (0)