From 0b9f93bd97a4fbd2e820f6824f2e5d68fb326500 Mon Sep 17 00:00:00 2001 From: Lucas C Wilcox Date: Tue, 28 May 2024 17:03:48 -0700 Subject: [PATCH] Update CUDA.jl to support SA bounds checking We need this https://github.com/JuliaGPU/CUDA.jl/commit/5da4d1d0355432758b3a50c0fed1a365d8f5e403#comments to have our kernels run. --- Project.toml | 2 +- ext/RavenCUDAExt.jl | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Project.toml b/Project.toml index 94b0e6c..59fbdff 100644 --- a/Project.toml +++ b/Project.toml @@ -27,7 +27,7 @@ RavenWriteVTKExt = "WriteVTK" [compat] Adapt = "3, 4" -CUDA = "4, 5" +CUDA = "5.3" Compat = "3.42, 4" GPUArraysCore = "0.1" KernelAbstractions = "0.9" diff --git a/ext/RavenCUDAExt.jl b/ext/RavenCUDAExt.jl index 833b739..b0f9dc5 100644 --- a/ext/RavenCUDAExt.jl +++ b/ext/RavenCUDAExt.jl @@ -14,7 +14,7 @@ Raven.arraytype(::Type{T}) where {T<:CuDeviceArray} = CuArray function Raven.pin(::Type{T}, A::Array) where {T<:CuArray} if length(A) > 0 - A = CUDA.Mem.pin(A) + A = CUDA.pin(A) end return A @@ -59,11 +59,4 @@ else Adapt.adapt_storage(::CUDA.KernelAdaptor, ::MPI.Comm) = nothing end -CUDA.@device_override function Base.checkbounds(A::StaticArrays.MArray, I...) - @inline - checkbounds(Bool, A, I...) || - CUDA.@print_and_throw("BoundsError while indexing an MArray.") - nothing -end - end # module RavenCUDAExt