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

Error when trying out the main branch #112

Open
YassinAbdelrahman opened this issue Jan 16, 2024 · 7 comments
Open

Error when trying out the main branch #112

YassinAbdelrahman opened this issue Jan 16, 2024 · 7 comments

Comments

@YassinAbdelrahman
Copy link

Hi all,

Whenever I try to run any kind of DRR generation with the main branch, I get this error:

CompileError: nvcc compilation of /tmp/tmpvqiw8grx/kernel.cu failed
[command: nvcc --cubin -D NUM_VOLUMES=1 -D NUM_MATERIALS=3 -D ATTENUATE_OUTSIDE_VOLUME=0 -D AIR_INDEX=0 -arch sm_75 -I/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic -I/autofs/isis10/user/yassin/deepdrr/deepdrr/projector -I/user/yassin/miniconda3/envs/deepdrr/lib/python3.8/site-packages/pycuda/cuda kernel.cu]
[stderr:
/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(54): error: identifier "texture" is undefined
  __attribute__((device)) float linearTex3D(texture<T, 3, mode> tex, float3 coord)
                                            ^

/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(54): error: type name is not allowed
  __attribute__((device)) float linearTex3D(texture<T, 3, mode> tex, float3 coord)
                                                    ^

/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(54): error: identifier "tex" is undefined
  __attribute__((device)) float linearTex3D(texture<T, 3, mode> tex, float3 coord)
                                                                ^

/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(54): error: type name is not allowed
  __attribute__((device)) float linearTex3D(texture<T, 3, mode> tex, float3 coord)
                                                                     ^

/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(54): error: too many initializer values
  __attribute__((device)) float linearTex3D(texture<T, 3, mode> tex, float3 coord)
                                                       ^

/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(54): error: expected a ")"
  __attribute__((device)) float linearTex3D(texture<T, 3, mode> tex, float3 coord)
                                                                            ^

/autofs/isis10/user/yassin/deepdrr/deepdrr/projector/cubic/cubicTex3D.cu(55): error: expected a ";"
  {
  ^

kernel.cu(2358): error: identifier "cubicTex3D" is undefined
      do { if (do_trace[0]) { do { px[0] = sx_ijk[0] + alpha * rx_ijk[0] - 0.5; py[0] = sy_ijk[0] + alpha * ry_ijk[0] - 0.5; pz[0] = sz_ijk[0] + alpha * rz_ijk[0] - 0.5; } while (0); do { do { seg_at_alpha[0][0] = round( cubicTex3D(seg_0_0, px[0], py[0], pz[0])); } while (0); do { seg_at_alpha[0][1] = round( cubicTex3D(seg_0_1, px[0], py[0], pz[0])); } while (0); do { seg_at_alpha[0][2] = round( cubicTex3D(seg_0_2, px[0], py[0], pz[0])); } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                             ^

kernel.cu(2358): error: identifier "cubicTex3D" is undefined
      do { if (do_trace[0]) { do { px[0] = sx_ijk[0] + alpha * rx_ijk[0] - 0.5; py[0] = sy_ijk[0] + alpha * ry_ijk[0] - 0.5; pz[0] = sz_ijk[0] + alpha * rz_ijk[0] - 0.5; } while (0); do { do { seg_at_alpha[0][0] = round( cubicTex3D(seg_0_0, px[0], py[0], pz[0])); } while (0); do { seg_at_alpha[0][1] = round( cubicTex3D(seg_0_1, px[0], py[0], pz[0])); } while (0); do { seg_at_alpha[0][2] = round( cubicTex3D(seg_0_2, px[0], py[0], pz[0])); } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                                                                                                                      ^

kernel.cu(2358): error: identifier "cubicTex3D" is undefined
      do { if (do_trace[0]) { do { px[0] = sx_ijk[0] + alpha * rx_ijk[0] - 0.5; py[0] = sy_ijk[0] + alpha * ry_ijk[0] - 0.5; pz[0] = sz_ijk[0] + alpha * rz_ijk[0] - 0.5; } while (0); do { do { seg_at_alpha[0][0] = round( cubicTex3D(seg_0_0, px[0], py[0], pz[0])); } while (0); do { seg_at_alpha[0][1] = round( cubicTex3D(seg_0_1, px[0], py[0], pz[0])); } while (0); do { seg_at_alpha[0][2] = round( cubicTex3D(seg_0_2, px[0], py[0], pz[0])); } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                                                                                                                                                                                                               ^

kernel.cu(2409): error: identifier "volume_0" is undefined
        do { if (do_trace[0] && (priority[0] == curr_priority)) { do { do { area_density[(0)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][0]; } while (0); do { area_density[(1)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][1]; } while (0); do { area_density[(2)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][2]; } while (0); } while (0); } } while (0);
                                                                                                                ^

kernel.cu(2409): error: no instance of overloaded function "tex3D" matches the argument list
            argument types are: (<error-type>, float, float, float)
        do { if (do_trace[0] && (priority[0] == curr_priority)) { do { do { area_density[(0)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][0]; } while (0); do { area_density[(1)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][1]; } while (0); do { area_density[(2)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][2]; } while (0); } while (0); } } while (0);
                                                                                                          ^

kernel.cu(2409): error: identifier "volume_0" is undefined
        do { if (do_trace[0] && (priority[0] == curr_priority)) { do { do { area_density[(0)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][0]; } while (0); do { area_density[(1)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][1]; } while (0); do { area_density[(2)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][2]; } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                           ^

kernel.cu(2409): error: no instance of overloaded function "tex3D" matches the argument list
            argument types are: (<error-type>, float, float, float)
        do { if (do_trace[0] && (priority[0] == curr_priority)) { do { do { area_density[(0)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][0]; } while (0); do { area_density[(1)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][1]; } while (0); do { area_density[(2)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][2]; } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                     ^

kernel.cu(2409): error: identifier "volume_0" is undefined
        do { if (do_trace[0] && (priority[0] == curr_priority)) { do { do { area_density[(0)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][0]; } while (0); do { area_density[(1)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][1]; } while (0); do { area_density[(2)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][2]; } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                                                                                                                                      ^

kernel.cu(2409): error: no instance of overloaded function "tex3D" matches the argument list
            argument types are: (<error-type>, float, float, float)
        do { if (do_trace[0] && (priority[0] == curr_priority)) { do { do { area_density[(0)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][0]; } while (0); do { area_density[(1)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][1]; } while (0); do { area_density[(2)] += (weight)*tex3D(volume_0, px[0], py[0], pz[0]) * seg_at_alpha[0][2]; } while (0); } while (0); } } while (0);
                                                                                                                                                                                                                                                                                                                                ^

kernel.cu(2786): error: identifier "volume_0" is undefined
              do { density_sample[0] = tex3D(volume_0, inp_x, inp_y, inp_z); mat_sample[0][0] = cubicTex3D(seg_0_0, inp_x, inp_y, inp_z); mat_sample[0][1] = cubicTex3D(seg_0_1, inp_x, inp_y, inp_z); mat_sample[0][2] = cubicTex3D(seg_0_2, inp_x, inp_y, inp_z); } while (0);
                                             ^

kernel.cu(2786): error: no instance of overloaded function "tex3D" matches the argument list
            argument types are: (<error-type>, float, float, float)
              do { density_sample[0] = tex3D(volume_0, inp_x, inp_y, inp_z); mat_sample[0][0] = cubicTex3D(seg_0_0, inp_x, inp_y, inp_z); mat_sample[0][1] = cubicTex3D(seg_0_1, inp_x, inp_y, inp_z); mat_sample[0][2] = cubicTex3D(seg_0_2, inp_x, inp_y, inp_z); } while (0);
                                       ^

kernel.cu(2786): error: identifier "cubicTex3D" is undefined
              do { density_sample[0] = tex3D(volume_0, inp_x, inp_y, inp_z); mat_sample[0][0] = cubicTex3D(seg_0_0, inp_x, inp_y, inp_z); mat_sample[0][1] = cubicTex3D(seg_0_1, inp_x, inp_y, inp_z); mat_sample[0][2] = cubicTex3D(seg_0_2, inp_x, inp_y, inp_z); } while (0);
                                                                                                ^

19 errors detected in the compilation of "kernel.cu".
]

Is this an error on my side? I have tried using cuda 11 and the latest cuda but I still keep having this same error.

Thank you,
Yassin

@benjamindkilleen
Copy link
Member

What is the output of nvcc --version?

@YassinAbdelrahman
Copy link
Author

Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Nov_22_10:17:15_PST_2023
Cuda compilation tools, release 12.3, V12.3.107
Build cuda_12.3.r12.3/compiler.33567101_0

That is the output

@YassinAbdelrahman
Copy link
Author

Do I have the wrong version? I am still stuck on this. The dev branch worked fine when using a CArm but not with projection matrices which is why I tried switching to the main branch, but now this is happening. Any help would be appreciated, I am still new to this. Thank you!

@benjamindkilleen
Copy link
Member

What was the error when you used a projection matrix on the dev branch? Sorry you're having an issue!

@YassinAbdelrahman
Copy link
Author

I have fixed it by using the cuda11x instead of 12x, apparently cuda 12.3 does not work with DeepDRR for me, could that just be the case? That DeepDRR does not work with cuda 12.3? Thank you for your help though!

@benjamindkilleen
Copy link
Member

benjamindkilleen commented Jan 23, 2024 via email

@YassinAbdelrahman
Copy link
Author

I don't have the original error message but the main error message was: "cuPy failed to load libnvrtc.so.12: cannot open shared object file: No such file or directory". This when installing with pip install .[cuda12x]. Once I made a new environment and installed with pip install .[cuda11x] and after installing pyopengl 3.1.1a1, the code did not give me another error. I hope this helps!

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

No branches or pull requests

2 participants