-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scalar indexing with CUDA #176
Comments
It always needs some companion packages to write a CUDA-specific kernel. However, this still fails right now: julia> using CUDA, CUDAKernels, KernelAbstractions
julia> @tullio A[k,i,a] = tanh(B[i,a] + C[k,i,a])
ERROR: MethodError: no method matching length(::Nothing)
Stacktrace:
[1] #s597#122
@ GPUCompiler ~/.julia/packages/GPUCompiler/S3TWf/src/cache.jl:18 [inlined]
[2] var"#s597#122"(f::Any, tt::Any, ::Any, job::Any)
@ GPUCompiler ./none:0
[3] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
@ Core ./boot.jl:599
[4] cached_compilation(cache::Dict{…}, job::GPUCompiler.CompilerJob, compiler::typeof(CUDA.cufunction_compile), linker::typeof(CUDA.cufunction_link))
@ GPUCompiler ~/.julia/packages/GPUCompiler/S3TWf/src/cache.jl:71
[5] cufunction(f::var"#gpu_##🇨🇺#225#6", tt::Type{…}; name::Nothing, always_inline::Bool, kwargs::Base.Pairs{…})
@ CUDA ~/.julia/packages/CUDA/ZdCxS/src/compiler/execution.jl:306
[6] macro expansion
@ CUDAKernels ~/.julia/packages/CUDA/ZdCxS/src/compiler/execution.jl:102 [inlined]
[7] (::KernelAbstractions.Kernel{…})(::CuArray{…}, ::Vararg{…}; ndrange::Tuple{…}, dependencies::CUDAKernels.CudaEvent, workgroupsize::Nothing, progress::Function)
@ CUDAKernels ~/.julia/packages/CUDAKernels/3IKLV/src/CUDAKernels.jl:283
[8] 𝒜𝒸𝓉!
@ Main ~/.julia/packages/Tullio/NGyNM/src/macro.jl:1172 [inlined]
[9] 𝒜𝒸𝓉!
@ Main ~/.julia/packages/Tullio/NGyNM/src/macro.jl:1169 [inlined]
[10] threader(fun!::var"#𝒜𝒸𝓉!#4", ::Type{…}, Z::CuArray{…}, As::Tuple{…}, Is::Tuple{…}, Js::Tuple{}, redfun::Function, block::Int64, keep::Nothing)
@ Tullio ~/.julia/packages/Tullio/NGyNM/src/eval.jl:104
[11] top-level scope
@ ~/.julia/packages/Tullio/NGyNM/src/macro.jl:1004
[12] top-level scope
@ ~/.julia/packages/CUDA/ZdCxS/src/initialization.jl:155
Some type information was truncated. Use `show(err)` to see complete types.
(@v1.10) pkg> st Tullio CUDA CUDAKernels KernelAbstraction
Status `~/.julia/environments/v1.10/Project.toml`
⌅ [052768ef] CUDA v4.0.1
[72cfdca4] CUDAKernels v0.4.7
[bc48ee85] Tullio v0.3.5
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` |
any idea what could be causing this? |
It's just #172 I think. The versions loaded here don't work together, sadly. |
as in Tullio with Cuda v4? Do you know what change in v4 is causing this? This is critical to the work I am doing right now. Maybe I can help in fixing this issue? |
Sorry the issue I meant to link to was this one: #168 (comment) I played a little bit today, and it can't be that hard to figure out what ought to replace |
thanks @mcabbott , I'm out sick for the few days so can possibly look at this over the weekend. unless someone more familiar with the package wants to take a crack. |
I'm running into the same issue. CUDA version info
|
@adrhill this branch (https://github.com/vpuri3/Tullio.jl/tree/total) has been working with GPU + Zygote for me. It has everything from #178, #177 in it. |
@mcabbott can you review those two PRs? |
@mcabbott ping |
MWE (copied from
test/cuda.jl
)The text was updated successfully, but these errors were encountered: