Skip to content

Commit d24d09b

Browse files
committed
Apply suggestions from code review
1 parent 2dc75bb commit d24d09b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/ReactantCUDAExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ function ka_with_reactant(ndrange, workgroupsize, obj, args...)
352352

353353
# figure out the optimal workgroupsize automatically
354354
if KA.workgroupsize(obj) <: KA.DynamicSize && workgroupsize === nothing
355-
if !Reactant.Compiler.PartitionKA[] || raising() || backend() in ("cpu", "tpu")
355+
if !Reactant.Compiler.PartitionKA[] || raising() || Reactant.Compiler.backend() in ("cpu", "tpu")
356356
threads = prod(ndrange)
357357
else
358358
config = CUDA.launch_configuration(kernel.fun; max_threads=prod(ndrange))

src/Compiler.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ function backend(; throw_error::Bool=true)
720720
if !(haskey(task_local_storage(), key) && !Base.isempty(task_local_storage(key)))
721721
throw_error && error("No Reactant backend context")
722722
end
723-
return last(task_local_storage(key)::Vector{Bool})
723+
return last(task_local_storage(key)::Vector{String})
724724
end
725725

726726
function backend!(f, backend::String)

0 commit comments

Comments
 (0)