File tree Expand file tree Collapse file tree 3 files changed +3
-32
lines changed Expand file tree Collapse file tree 3 files changed +3
-32
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,8 @@ class GenericGlobalHandlerTy {
131
131
132
132
// / Get the address and size of a global in the image. Address and size are
133
133
// / return in \p ImageGlobal, the global name is passed in \p ImageGlobal.
134
- virtual Error getGlobalMetadataFromImage (GenericDeviceTy &Device,
135
- DeviceImageTy &Image,
136
- GlobalTy &ImageGlobal);
134
+ Error getGlobalMetadataFromImage (GenericDeviceTy &Device,
135
+ DeviceImageTy &Image, GlobalTy &ImageGlobal);
137
136
138
137
// / Read the memory associated with a global from the image and store it on
139
138
// / the host. The name, size, and destination are defined by \p HostGlobal.
Original file line number Diff line number Diff line change @@ -1327,34 +1327,6 @@ class CUDAGlobalHandlerTy final : public GenericGlobalHandlerTy {
1327
1327
DeviceGlobal.setPtr (reinterpret_cast <void *>(CUPtr));
1328
1328
return Plugin::success ();
1329
1329
}
1330
-
1331
- Error getGlobalMetadataFromImage (GenericDeviceTy &Device,
1332
- DeviceImageTy &Image,
1333
- GlobalTy &ImageGlobal) override {
1334
- // If the image is an ELF we can use the generic path, otherwise fall back
1335
- // and use cuModuleGetGlobal to query the image.
1336
- if (utils::elf::isELF (Image.getMemoryBuffer ().getBuffer ())) {
1337
- return GenericGlobalHandlerTy::getGlobalMetadataFromImage (Device, Image,
1338
- ImageGlobal);
1339
- }
1340
-
1341
- CUDADeviceImageTy &CUDAImage = static_cast <CUDADeviceImageTy &>(Image);
1342
-
1343
- const char *GlobalName = ImageGlobal.getName ().data ();
1344
-
1345
- size_t CUSize;
1346
- CUdeviceptr CUPtr;
1347
- CUresult Res =
1348
- cuModuleGetGlobal (&CUPtr, &CUSize, CUDAImage.getModule (), GlobalName);
1349
- if (auto Err = Plugin::check (Res, " Error in cuModuleGetGlobal for '%s': %s" ,
1350
- GlobalName))
1351
- return Err;
1352
-
1353
- // Setup the global symbol's address and size.
1354
- ImageGlobal.setPtr (reinterpret_cast <void *>(CUPtr));
1355
- ImageGlobal.setSize (CUSize);
1356
- return Plugin::success ();
1357
- }
1358
1330
};
1359
1331
1360
1332
// / Class implementing the CUDA-specific functionalities of the plugin.
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ struct GenELF64DeviceTy : public GenericDeviceTy {
289
289
290
290
// / This plugin does not support interoperability, do nothing
291
291
Error initAsyncInfoImpl (AsyncInfoWrapperTy &AsyncInfoWrapper) override {
292
- return Plugin::success ( );
292
+ return Plugin::error ( " initAsyncInfoImpl not supported " );
293
293
}
294
294
295
295
// / This plugin does not support interoperability
You can’t perform that action at this time.
0 commit comments