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

Commit abbc3fd

Browse files
committed
fix overdub of a pure function
1 parent 839c397 commit abbc3fd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/context.jl

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ const InlinePass = Cassette.@pass transform
2525
Cassette.@context CUDACtx
2626
const cudactx = Cassette.disablehooks(CUDACtx(pass = InlinePass))
2727

28-
function Cassette.overdub(ctx::CUDACtx, ::typeof(isdevice))
29-
return true
30-
end
28+
Cassette.overdub(::CUDACtx, ::typeof(datatype_align), ::Type{T}) where {T} = datatype_align(T)
29+
Cassette.overdub(ctx::CUDACtx, ::typeof(isdevice)) = true
3130

3231
# libdevice.jl
3332
for f in (:cos, :cospi, :sin, :sinpi, :tan,

0 commit comments

Comments
 (0)