MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_cuda_runtime_args

Function get_cuda_runtime_args

src/custom/impl/platform/custom_cuda.cpp:16–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#if MGB_CUDA
15
16const CudaRuntimeArgs get_cuda_runtime_args(const RuntimeArgs& rt_args) {
17 mgb_assert(
18 rt_args.device().enumv() == DeviceEnum::cuda,
19 "devive type should be cuda.");
20 const CompNodeEnv& env =
21 CompNodeEnv::from_comp_node(to_builtin<CompNode, Device>(rt_args.device()));
22 const CompNodeEnv::CudaEnv& cuda_env = env.cuda_env();
23 return {cuda_env.device, cuda_env.stream};
24}
25
26int get_cuda_device_id(Device device) {
27 auto cn = to_builtin<CompNode>(device);

Callers

nothing calls this directly

Calls 2

enumvMethod · 0.45
deviceMethod · 0.45

Tested by

no test coverage detected