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

Using undefined globals leads to LLVM ISEL failures #2087

Open
maleadt opened this issue Sep 19, 2023 · 0 comments
Open

Using undefined globals leads to LLVM ISEL failures #2087

maleadt opened this issue Sep 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@maleadt
Copy link
Member

maleadt commented Sep 19, 2023

julia> kernel() = LLVMPtr
kernel (generic function with 1 method)

julia> CUDA.code_ptx(kernel, ())
ERROR: LLVM error: Cannot select: 0x10965278: ch = AtomicStore<(store release (s64) into @0, addrspace 1)> 0x109650d8:1, 0x109653b0, 0x109650d8
  0x109653b0: i64 = NVPTXISD::Wrapper TargetGlobalAddress:i64<{}* addrspace(1)* @0> 0
    0x10965348: i64 = TargetGlobalAddress<{}* addrspace(1)* @0> 0
  0x109650d8: i64,ch,glue = NVPTXISD::ProxyReg 0x10965070, 0x10964fa0, 0x10965070:1
    0x10964fa0: i64,ch,glue = NVPTXISD::LoadParam<(load (s64))> 0x10964f38, Constant:i32<1>, Constant:i32<0>, 0x10964f38:1
      0x10964988: i32 = Constant<1>
      0x10964e00: i32 = Constant<0>
      0x10964f38: ch,glue = NVPTXISD::CallArgEnd 0x10964ed0, Constant:i32<1>, 0x10964ed0:1
        0x10964988: i32 = Constant<1>
        0x10964ed0: ch,glue = NVPTXISD::LastCallArg 0x10964e68, Constant:i32<1>, Constant:i32<1>, 0x10964e68:1
          0x10964988: i32 = Constant<1>
          0x10964988: i32 = Constant<1>
          0x10964e68: ch,glue = NVPTXISD::CallArg 0x10964bf8, Constant:i32<1>, Constant:i32<0>, 0x10964bf8:1
            0x10964988: i32 = Constant<1>
            0x10964e00: i32 = Constant<0>
            0x10964bf8: ch,glue = NVPTXISD::CallArgBegin 0x109647e8, 0x109647e8:1
              0x109647e8: ch,glue = NVPTXISD::CallVoid 0x109649f0, 0x10965418, 0x109649f0:1
                0x10965418: i64 = NVPTXISD::Wrapper TargetGlobalAddress:i64<{}* ({}*, {}*)* @ijl_get_binding_or_error> 0
                  0x10965210: i64 = TargetGlobalAddress<{}* ({}*, {}*)* @ijl_get_binding_or_error> 0
                0x109649f0: ch,glue = NVPTXISD::PrintCallUni 0x10964850, Constant:i32<1>, 0x10964850:1
                  0x10964988: i32 = Constant<1>
                  0x10964850: ch,glue = NVPTXISD::DeclareRet 0x10964b28, Constant:i32<1>, Constant:i32<64>, Constant:i32<0>, 0x10964b28:1




    0x10965070: ch,glue = callseq_end 0x10964fa0:1, TargetConstant:i64<70>, TargetConstant:i64<71>, 0x10964fa0:2
      0x10964a58: i64 = TargetConstant<70>
      0x10965008: i64 = TargetConstant<71>
      0x10964fa0: i64,ch,glue = NVPTXISD::LoadParam<(load (s64))> 0x10964f38, Constant:i32<1>, Constant:i32<0>, 0x10964f38:1
        0x10964988: i32 = Constant<1>
        0x10964e00: i32 = Constant<0>
        0x10964f38: ch,glue = NVPTXISD::CallArgEnd 0x10964ed0, Constant:i32<1>, 0x10964ed0:1
          0x10964988: i32 = Constant<1>
          0x10964ed0: ch,glue = NVPTXISD::LastCallArg 0x10964e68, Constant:i32<1>, Constant:i32<1>, 0x10964e68:1
            0x10964988: i32 = Constant<1>
            0x10964988: i32 = Constant<1>
            0x10964e68: ch,glue = NVPTXISD::CallArg 0x10964bf8, Constant:i32<1>, Constant:i32<0>, 0x10964bf8:1
              0x10964988: i32 = Constant<1>
              0x10964e00: i32 = Constant<0>
              0x10964bf8: ch,glue = NVPTXISD::CallArgBegin 0x109647e8, 0x109647e8:1
                0x109647e8: ch,glue = NVPTXISD::CallVoid 0x109649f0, 0x10965418, 0x109649f0:1
                  0x10965418: i64 = NVPTXISD::Wrapper TargetGlobalAddress:i64<{}* ({}*, {}*)* @ijl_get_binding_or_error> 0

                  0x109649f0: ch,glue = NVPTXISD::PrintCallUni 0x10964850, Constant:i32<1>, 0x10964850:1

Julia 1.10

@maleadt maleadt added the bug Something isn't working label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant