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

Commit b2cc3e1

Browse files
committed
Only run WMMA tests on 1.4.1+
1 parent 1481594 commit b2cc3e1

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/device/cuda/wmma.jl

+2-7
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ using CUDAnative: AS, DevicePtr
77
# CONSTANTS
88
################################################################################
99

10-
# Determines whether or not to Core.AddrSpacePtr is available
11-
const addrspaceptr_available = (VERSION >= v"1.5.0-DEV.324")
12-
1310
# Maps PTX types to Julia array types
1411
const map_ptx_to_jl_array = Dict(
1512
"f16" => Float16,
@@ -52,7 +49,6 @@ get_frag_info(matrix, ptx_el_type) = (
5249

5350
get_addrspace_info(addr_space) = convert(Int, map_ptx_as_to_as_ty[addr_space])
5451

55-
if addrspaceptr_available
5652
@generated function Base.cconvert(::Type{Core.AddrSpacePtr{T, as}}, x::DevicePtr{T, AS}) where {T, as, AS}
5753
ir = "%ptr = inttoptr i64 %0 to i8 addrspace($as)*
5854
ret i8 addrspace($as)* %ptr"
@@ -61,7 +57,6 @@ if addrspaceptr_available
6157
return Base.llvmcall($ir, Core.AddrSpacePtr{T, as}, Tuple{Int64}, Base.bitcast(Int64, x))
6258
end
6359
end
64-
end
6560

6661
# Fix for https://github.com/JuliaGPU/CUDAnative.jl/issues/587.
6762
# Instead of ccall'ing the intrinsics with NTuple{N, T} (which gets lowered to
@@ -133,7 +128,7 @@ for mat in ["a", "b", "c"],
133128

134129
ccall_name = "extern $llvm_intr"
135130

136-
ptr_ty = addrspaceptr_available ? Core.AddrSpacePtr{arr_ty, addr_space_int} : Ref{arr_ty}
131+
ptr_ty = Core.AddrSpacePtr{arr_ty, addr_space_int}
137132
struct_ty = Symbol("LLVMStruct$sz")
138133

139134
@eval $func_name(src_addr, stride) = convert(NTuple{$sz, $frag_ty}, ccall($ccall_name, llvmcall, $struct_ty{$frag_ty}, ($ptr_ty, Int32), src_addr, stride))
@@ -188,7 +183,7 @@ for mat in ["d"],
188183
frag_types = ntuple(i -> frag_ty, sz)
189184
frag_vars = ntuple(i -> :(data[$i]), sz)
190185

191-
ptr_ty = addrspaceptr_available ? Core.AddrSpacePtr{arr_ty, addr_space_int} : Ref{arr_ty}
186+
ptr_ty = Core.AddrSpacePtr{arr_ty, addr_space_int}
192187

193188
@eval $func_name(dst_addr, data, stride) = ccall($ccall_name, llvmcall, Nothing, ($ptr_ty, $(frag_types...), Int32), dst_addr, $(frag_vars...), stride)
194189
@eval export $func_name

test/device/wmma.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Need https://github.com/JuliaLang/julia/pull/33970
22
# and https://github.com/JuliaLang/julia/pull/34043
3-
if VERSION >= v"1.4.0-DEV.666" && capability(device()) >= v"7.0"
3+
if VERSION >= v"1.4.1" && capability(device()) >= v"7.0"
44

55
using CUDAnative.WMMA
66

0 commit comments

Comments
 (0)