From ec995c594d5a787ca2ce42b94131e552b2be6c4e Mon Sep 17 00:00:00 2001 From: Aganlengzi Date: Thu, 21 Apr 2022 19:36:35 +0800 Subject: [PATCH] [CustomDevice] fix macro (#42073) * [CustomDevice] fix macro * fix --- paddle/phi/backends/device_ext.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/paddle/phi/backends/device_ext.h b/paddle/phi/backends/device_ext.h index 6315fe15afd..749d8d323b6 100644 --- a/paddle/phi/backends/device_ext.h +++ b/paddle/phi/backends/device_ext.h @@ -523,14 +523,14 @@ struct CustomRuntimeParams { char reserved[32]; }; -#define PADDLE_CUSTOM_RUNTIME_CHECK_VERSION(params) \ - if ((params)->size != sizeof(DevicePluginParams) && \ - (params)->interface->size != sizeof(C_DeviceInterface)) { \ - return; \ - } \ - (params)->version.major = PADDLE_DEVICE_PLUGIN_MAJOR_VERSION; \ - (params)->version.minor = PADDLE_DEVICE_PLUGIN_MINOR_VERSION; \ - (params)->version.patch = PADDLE_DEVICE_PLUGIN_PATCH_VERSION; +#define PADDLE_CUSTOM_RUNTIME_CHECK_VERSION(params) \ + if ((params)->size != sizeof(CustomRuntimeParams) && \ + (params)->interface->size != sizeof(C_DeviceInterface)) { \ + return; \ + } \ + (params)->version.major = PADDLE_CUSTOM_RUNTIME_MAJOR_VERSION; \ + (params)->version.minor = PADDLE_CUSTOM_RUNTIME_MINOR_VERSION; \ + (params)->version.patch = PADDLE_CUSTOM_RUNTIME_PATCH_VERSION; // Plugin implement it and fill CustomRuntimeParams void InitPlugin(CustomRuntimeParams*); -- GitLab