Failed to compile correctly:Error: unsupported operation

I encountered a strange issue. The compiler reports an error on the following line of code:

bool_array_cache_ |= (uint32_t)v << bool_array_cache_offset_;

Here, v is of type bool, and the other two variables are member variables of a class, both of type uint32_t. The object of this class is declared as a thread-local variable. It should be stored in registers or local memory.

I don’t understand why the compiler is reporting the error: Error: unsupported operation.

Source code:
src.zip (11.6 KB)
Cuda: Cuda compilation tools, release 12.6, V12.6.20
OS: Ubuntu 20.04.5 LTS

Full command:

nvcc -ptx -arch=compute_52 -std=c++17 -o kernel.ptx kernel.cu

Additionally, there’s another strange issue: if the 4th and 5th lines of code in the kernel function are commented out, the code compiles successfully. However, the commented-out lines don’t seem to be related to the code that caused the error.

According to my testing it compiles if you specify -G. That’s just another observation.

I would suggest filing a bug.

This maps to ticket ID4859460 , we will get ticket conclusion here once it is completed in house . Thanks for filing the ticket .

Hi,
We are developing a project that requires constant recompilation. Simply put, it is a program that translates a sequence of instructions in a virtual machine into CUDA source code, compiles, and executes it. However, we found that in certain cases, the computation results produced by the compiled CUDA program are incorrect. To reproduce this error, we have simplified one of the examples as much as possible, but we encountered a compilation error. Before addressing the actual issue we are facing, we likely need to solve this compilation error first, so we can create a minimal example to reproduce the error.
The bug we encountered has seriously blocked the completion of the project.

During the development process, we also encountered other issues, such as incorrect correspondence between the SASS code and source code in NCU, and errors in displaying register dependencies. Do you have a more convenient and direct way to contact you for communication?

Hi @SparkHu ,

  1. The reported 4859460 is fixed and verified internally , aiming a CUDA release around the first quarter of 2025 .
  2. For your project details and see if we can help with it , please try adding comments to the reported ticket 4859460 which can sync comments to our internal engineering team and not being public if things are sensitive . Replying methods can refer to How to report a bug - #3 by Yuki_Ni
  3. For more new bugs/issues you would like to report , please use the same way you did for 4859460 to raise us new tickets . Note that each ticket is supposed to report one bug and we usually will scrub tickets within a week .

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.