Skip to content
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

Validation uses wrong interpreter #173

Closed
koenvos opened this issue Apr 12, 2021 · 0 comments · Fixed by #174
Closed

Validation uses wrong interpreter #173

koenvos opened this issue Apr 12, 2021 · 0 comments · Fixed by #174

Comments

@koenvos
Copy link

koenvos commented Apr 12, 2021

Describe the bug

Some math operations in CUDA/src/device/intrinsics/math.jl give compile errors.

It seems that operations that replace ones in Base and SpecialFunctions work fine.
Those that do not have a definition elsewhere give a "KernelError: kernel returns a value of type Union{}."
Those that redefine operations in FastMath give "invalid LLVM IR Reason: unsupported dynamic function invocation."

To reproduce

The Minimal Working Example (MWE) for this bug:

using CUDA
a = CUDA.ones(10)
function kernel(a)
    i = threadIdx().x
    a[i] = CUDA.rsqrt(a[i])
    return nothing
end
@cuda threads=length(a) kernel(a)
--> ERROR: LoadError: GPU compilation of kernel kernel(CuDeviceVector{Float32, 1}) failed KernelError: kernel 
returns a value of type `Union{}`
Manifest.toml

CUDA v3.0.0
GPUArrays v6.2.2
GPUCompiler v0.11.2
LLVM v3.6.0

Version info

Details on Julia:
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = "C:\Program Files\Microsoft VS Code\Code.exe"
JULIA_NUM_THREADS = 6

Details on CUDA:
CUDA toolkit 11.1.1, artifact installation
CUDA driver 11.1.0
NVIDIA driver 456.71.0

Libraries:

  • CUBLAS: 11.3.0
  • CURAND: 10.2.2
  • CUFFT: 10.3.0
  • CUSOLVER: 11.0.1
  • CUSPARSE: 11.3.0
  • CUPTI: 14.0.0
  • NVML: 11.0.0+456.71
  • CUDNN: 8.10.0 (for CUDA 11.2.0)
  • CUTENSOR: 1.2.2 (for CUDA 11.1.0)

Toolchain:

  • Julia: 1.6.0
  • LLVM: 11.0.1
  • 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
  • Device support: sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80

1 device:
0: GeForce RTX 2070 (sm_75, 5.286 GiB / 8.000 GiB available)

@maleadt maleadt transferred this issue from JuliaGPU/CUDA.jl Apr 12, 2021
@maleadt maleadt changed the title Compile errors for intrinsic math functions Validation uses wrong interpreter Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant