File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ const __llvm_initialized = Ref(false)
157
157
if libraries
158
158
runtime = load_runtime (job; ctx)
159
159
runtime_fns = LLVM. name .(defs (runtime))
160
+ runtime_intrinsics = [" julia.gc_alloc_obj" ]
160
161
end
161
162
162
163
@timeit_debug to " Library linking" begin
@@ -166,7 +167,7 @@ const __llvm_initialized = Ref(false)
166
167
@timeit_debug to " target libraries" link_libraries! (job, ir, undefined_fns)
167
168
168
169
# GPU run-time library
169
- if any (fn -> fn in runtime_fns, undefined_fns)
170
+ if any (fn -> fn in runtime_fns || fn in runtime_intrinsics , undefined_fns)
170
171
@timeit_debug to " runtime library" link_library! (ir, runtime)
171
172
end
172
173
end
Original file line number Diff line number Diff line change @@ -322,7 +322,11 @@ function lower_gc_frame!(fun::LLVM.Function)
322
322
Builder (ctx) do builder
323
323
# NOTE: this happens late during the pipeline, where we may have to
324
324
# pass a kernel state arguments to the runtime function.
325
- state = kernel_state_type (job)
325
+ state = if job. source. kernel
326
+ kernel_state_type (job)
327
+ else
328
+ Nothing
329
+ end
326
330
327
331
position! (builder, call)
328
332
ptr = call! (builder, Runtime. get (:gc_pool_alloc ), [sz]; state)
You can’t perform that action at this time.
0 commit comments