[flang-commits] [flang] [flang][cuda] Fix module registration (PR #113358)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Oct 22 12:05:35 PDT 2024


================
@@ -14,13 +14,16 @@ namespace Fortran::runtime::cuda {
 
 extern "C" {
 
-extern void **__cudaRegisterFatBinary(void *data);
+extern void **__cudaRegisterFatBinary(void *);
+extern void __cudaRegisterFatBinaryEnd(void *);
 extern void __cudaRegisterFunction(void **fatCubinHandle, const char *hostFun,
     char *deviceFun, const char *deviceName, int thread_limit, uint3 *tid,
     uint3 *bid, dim3 *bDim, dim3 *gDim, int *wSize);
 
 void *RTDECL(CUFRegisterModule)(void *data) {
-  return __cudaRegisterFatBinary(data);
+  void** fatHandle = __cudaRegisterFatBinary(data);
----------------
clementval wrote:

```suggestion
  void **fatHandle = __cudaRegisterFatBinary(data);
```

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


More information about the flang-commits mailing list