[clang] [CIR][CUDA] Support built-in CUDA surface type (PR #196079)

Konstantinos Parasyris via cfe-commits cfe-commits at lists.llvm.org
Fri May 22 06:41:49 PDT 2026


================
@@ -132,6 +130,12 @@ class NVPTXTargetCIRGenInfo : public TargetCIRGenInfo {
 public:
   NVPTXTargetCIRGenInfo(CIRGenTypes &cgt)
       : TargetCIRGenInfo(std::make_unique<NVPTXABIInfo>(cgt)) {}
+
+  mlir::Type getCUDADeviceBuiltinSurfaceDeviceType() const override {
+    // CUDA surface is represented as a 64-bit handle on device
----------------
koparasy wrote:

I find the OG side comment more informative:

```
    // On the device side, surface reference is represented as an object handle
    // in 64-bit integer.
```

https://github.com/llvm/llvm-project/pull/196079


More information about the cfe-commits mailing list