deepdrr icon indicating copy to clipboard operation
deepdrr copied to clipboard

Error when trying out the main branch

Open YassinAbdelrahman opened this issue 5 months ago • 7 comments

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

YassinAbdelrahman avatar Jan 16 '24 12:01 YassinAbdelrahman