Skip to content

Cannot precompile GPU code with SnoopPrecompile #1870

@marius311

Description

@marius311

An MWE as requested by #1865 (comment)

module MWE

using CUDA, SnoopPrecompile

@precompile_all_calls begin
    sqrt.(CUDA.ones(2))
end

end

Then from a session:

julia> using MWE

julia> sqrt.(ones(Float32,2)) # note *CPU* array here
JIT session error: Symbols not found: [ __nv_sqrtf ]
JIT session error: Symbols not found: [ __nv_sqrtf ]
JIT session error: Symbols not found: [ __nv_sqrtf ]
JIT session error: Symbols not found: [ __nv_sqrtf ]
JIT session error: Symbols not found: [ __nv_sqrtf ]
JIT session error: Symbols not found: [ __nv_sqrtf ]
JIT session error: Symbols not found: [ __nv_sqrtf ]
2-element Vector{Float32}:
 1.0
 1.0

Verison info:

Julia 1.9-rc2
CUDA v4.1.4 https://github.com/JuliaGPU/CUDA.jl.git#1dec082
GPUCompiler v0.19.1
LLVM v5.0.0

julia> CUDA.versioninfo()
CUDA runtime 12.1, artifact installation
CUDA driver 12.1
NVIDIA driver 525.105.17, originally for CUDA 12.0

Libraries: 
- CUBLAS: 12.1.0
- CURAND: 10.3.2
- CUFFT: 11.0.2
- CUSOLVER: 11.4.4
- CUSPARSE: 12.0.2
- CUPTI: 18.0.0
- NVML: 12.0.0+525.105.17

Toolchain:
- Julia: 1.9.0-rc2
- LLVM: 14.0.6
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5
- Device capability support: sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86

1 device:
  0: NVIDIA A100-PCIE-40GB (sm_80, 39.390 GiB / 40.000 GiB available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamSomebody else's problem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions