[clang] [CIR][CUDA] Support host-side texture registration (PR #236849)

David Rivera via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 13:50:08 PDT 2026


================
@@ -668,7 +674,9 @@ Attribute CUDAVarRegistrationInfoAttr::parse(AsmParser &parser, Type odsType) {
       isConstant = true;
     else if (flag == "managed")
       isManaged = true;
-    else if (flag == "surface_type") {
+    else if (flag == "normalized")
----------------
RiverDave wrote:

I noticed the parser accepts texture_type/normalized regardless of the kind, but the printer only emits them for Texture, so e.g. `<s, Surface, normalized>` parses fine and silently drops it on print. Would it make sense to reject keywords that don't match the kind? A texture case in clang/test/CIR/IR/var-registration.cir would also be nice to cover the round-trip.

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


More information about the cfe-commits mailing list