diff --git a/src/native/cuda/metax/runtime_.h b/src/native/cuda/metax/runtime_.h index 348d44b..5785a51 100644 --- a/src/native/cuda/metax/runtime_.h +++ b/src/native/cuda/metax/runtime_.h @@ -3,6 +3,8 @@ #include +#include + #include "native/cuda/metax/device_.h" #include "native/cuda/runtime_.h" @@ -23,11 +25,17 @@ struct Runtime static constexpr auto DeviceSynchronize = mcDeviceSynchronize; - static constexpr auto Malloc = mcMalloc; + static constexpr auto Malloc = [](auto&&... args) { + return mcMalloc(std::forward(args)...); + }; - static constexpr auto Memcpy = mcMemcpy; + static constexpr auto Memcpy = [](auto&&... args) { + return mcMemcpy(std::forward(args)...); + }; - static constexpr auto Free = mcFree; + static constexpr auto Free = [](auto&&... args) { + return mcFree(std::forward(args)...); + }; static constexpr auto MemcpyHostToHost = mcMemcpyHostToHost; diff --git a/src/native/cuda/moore/runtime_.h b/src/native/cuda/moore/runtime_.h index 42227e8..8ced2ed 100644 --- a/src/native/cuda/moore/runtime_.h +++ b/src/native/cuda/moore/runtime_.h @@ -19,11 +19,17 @@ struct Runtime static constexpr auto SetDevice = musaSetDevice; - static constexpr auto GetDevice = musaGetDevice; + static constexpr auto GetDevice = [](auto&&... args) { + return musaGetDevice(std::forward(args)...); + }; - static constexpr auto GetDeviceCount = musaGetDeviceCount; + static constexpr auto GetDeviceCount = [](auto&&... args) { + return musaGetDeviceCount(std::forward(args)...); + }; - static constexpr auto DeviceSynchronize = musaDeviceSynchronize; + static constexpr auto DeviceSynchronize = [](auto&&... args) { + return musaDeviceSynchronize(std::forward(args)...); + }; static constexpr auto Malloc = [](auto&&... args) { return musaMalloc(std::forward(args)...);