MCPcopy Create free account
hub / github.com/XpuOS/xsched / CudaQueueCreate

Function CudaQueueCreate

platforms/cuda/hal/src/level1/cuda_queue.cpp:83–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83EXPORT_C_FUNC XResult CudaQueueCreate(HwQueueHandle *hwq, CUstream stream)
84{
85 if (hwq == nullptr) {
86 XWARN("CudaQueueCreate failed: hwq is nullptr");
87 return kXSchedErrorInvalidValue;
88 }
89 if (stream == nullptr) {
90 XWARN("CudaQueueCreate failed: does not support default stream");
91 return kXSchedErrorNotSupported;
92 }
93
94 HwQueueHandle hwq_h = GetHwQueueHandle(stream);
95 auto res = HwQueueManager::Add(hwq_h, [&]() { return xsched::cuda::CudaQueueCreate(stream); });
96 if (res == kXSchedSuccess) *hwq = hwq_h;
97 return res;
98}

Callers 3

GetPTDSFunction · 0.85
XStreamCreateFunction · 0.85

Calls 1

GetHwQueueHandleFunction · 0.50

Tested by

no test coverage detected