Skip to content

Commit

Permalink
[CUDA] Disable registering surfaces and textures with the new driver
Browse files Browse the repository at this point in the history
Summary:
These runtime calls don't seem to be supported anymore, disable them for
now.
  • Loading branch information
jhuber6 committed Jan 18, 2024
1 parent 774b957 commit cb2f340
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions clang/test/Driver/linker-wrapper-image.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,9 @@
// CUDA-NEXT: br label %if.end

// CUDA: sw.surface:
// CUDA-NEXT: call void @__cudaRegisterSurface(ptr %0, ptr %addr, ptr %name, ptr %name, i32 %textype, i32 %extern)
// CUDA-NEXT: br label %if.end

// CUDA: sw.texture:
// CUDA-NEXT: call void @__cudaRegisterTexture(ptr %0, ptr %addr, ptr %name, ptr %name, i32 %textype, i32 %normalized, i32 %extern)
// CUDA-NEXT: br label %if.end

// CUDA: if.end:
Expand Down
3 changes: 2 additions & 1 deletion clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,8 @@ wrapDeviceImages(ArrayRef<std::unique_ptr<MemoryBuffer>> Buffers,
case OFK_Cuda:
if (Error Err = offloading::wrapCudaBinary(
M, BuffersToWrap.front(),
offloading::getOffloadEntryArray(M, "cuda_offloading_entries")))
offloading::getOffloadEntryArray(M, "cuda_offloading_entries"),
/*Suffix=*/"", /*EmitSurfacesAndTextures=*/false))
return std::move(Err);
break;
case OFK_HIP:
Expand Down

0 comments on commit cb2f340

Please sign in to comment.