未验证 提交 ec995c59 编写于 作者: A Aganlengzi 提交者: GitHub

[CustomDevice] fix macro (#42073)

* [CustomDevice] fix macro

* fix
上级 fb87df66
......@@ -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*);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册