Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit 839c397

Browse files
committed
force inline the heck out of everything
1 parent 9abab2d commit 839c397

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/context.jl

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@
1515

1616
using Cassette
1717

18+
function transform(ctx, ref)
19+
ci = ref.code_info
20+
ci.inlineable = true
21+
return ci
22+
end
23+
const InlinePass = Cassette.@pass transform
24+
1825
Cassette.@context CUDACtx
19-
const cudactx = Cassette.disablehooks(CUDACtx())
26+
const cudactx = Cassette.disablehooks(CUDACtx(pass = InlinePass))
2027

2128
function Cassette.overdub(ctx::CUDACtx, ::typeof(isdevice))
2229
return true
@@ -41,4 +48,3 @@ end
4148

4249
contextualize(f::F) where F = (args...) -> Cassette.overdub(cudactx, f, args...)
4350

44-

0 commit comments

Comments
 (0)