yaxunl added a comment. LGTM on HIP side. I am not sure whether CUDA needs this.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4441 if (Linkage != llvm::GlobalValue::InternalLinkage && - (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>())) + (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>() || + D->getType()->isCUDADeviceBuiltinSurfaceType() || ---------------- hliao wrote: > yaxunl wrote: > > we need also do this with variables with HIPManagedAttr and add a test for > > that > those managed var seems already being marked 'externally_initalized' in > lib/CodeGen/CGCUDANV.cpp. Do you have missing places to mark them? sorry, I fogot. Then it should be OK. We don't have other places to handle managed variables. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107718/new/ https://reviews.llvm.org/D107718 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits