Skip to content

Commit ec29322

Browse files
authored
[SYCL][LIBCLC][CUDA] Remove suq.depth instruction (#5378)
This patch removes llvm.nvvm.suq.depth from the image functions. This instruction doesn't work in CUDA and causes a CUDA_ERROR_NOT_FOUND or a CUDA_ERROR_NOT_SUPPORTED if present in the fatbin, even if it is not actually executed.
1 parent 6d522aa commit ec29322

File tree

1 file changed

+7
-2
lines changed
  • libclc/ptx-nvidiacl/libspirv/images

1 file changed

+7
-2
lines changed

libclc/ptx-nvidiacl/libspirv/images/image.cl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,19 @@ void __nvvm_sust_3d_v4i32_clamp(write_only image3d_t, int, int, int, int, int,
148148

149149
int __nvvm_suq_width(long) __asm("llvm.nvvm.suq.width");
150150
int __nvvm_suq_height(long) __asm("llvm.nvvm.suq.height");
151-
int __nvvm_suq_depth(long) __asm("llvm.nvvm.suq.depth");
151+
int __nvvm_suq_depth(long arg) {
152+
// suq.depth generates runtime errors in CUDA
153+
return -1;
154+
}
152155

153156
int __nvvm_suq_width_1i(read_only image1d_t) __asm("llvm.nvvm.suq.width");
154157
int __nvvm_suq_width_2i(read_only image2d_t) __asm("llvm.nvvm.suq.width");
155158
int __nvvm_suq_width_3i(read_only image3d_t) __asm("llvm.nvvm.suq.width");
156159
int __nvvm_suq_height_2i(read_only image2d_t) __asm("llvm.nvvm.suq.height");
157160
int __nvvm_suq_height_3i(read_only image3d_t) __asm("llvm.nvvm.suq.height");
158-
int __nvvm_suq_depth_3i(read_only image3d_t) __asm("llvm.nvvm.suq.depth");
161+
int __nvvm_suq_depth_3i(read_only image3d_t arg) {
162+
return -1;
163+
}
159164

160165
// Helpers
161166

0 commit comments

Comments
 (0)