You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an operator kernel, we usually got a framework::ExecutionContext object, and if we are implement GPU kernel, we often need to get CUDADeviceContext out from ExecutionContext. Currently we have to do sevaral cast to get it, need to simplify this.
Current sample:
auto* device_context =
const_cast<platform::DeviceContext*>(context.device_context_);
auto cuda_ctx =
reinterpret_cast<platform::CUDADeviceContext*>(device_context);
The text was updated successfully, but these errors were encountered:
typhoonzero
changed the title
An efficient way to get CUDADeviceContext
Need an efficient way to get CUDADeviceContext
Sep 19, 2017
In an operator kernel, we usually got a
framework::ExecutionContext
object, and if we are implement GPU kernel, we often need to getCUDADeviceContext
out fromExecutionContext
. Currently we have to do sevaral cast to get it, need to simplify this.Current sample:
The text was updated successfully, but these errors were encountered: