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

Method getROCMContext

dnn/src/rocm/megcore/public_api/computing.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21megcoreStatus_t megcore::getROCMContext(
22 megcoreComputingHandle_t handle, ROCMContext* ctx) {
23 auto&& H = handle;
24 megdnn_assert(H);
25 megcoreDeviceHandle_t dev_handle = H->content->dev_handle();
26 megcorePlatform_t platform;
27 megcoreGetPlatform(dev_handle, &platform);
28 megdnn_assert(platform == megcorePlatformROCM);
29 auto context = static_cast<megcore::rocm::ROCMComputingContext*>(H->content.get());
30 *ctx = context->context();
31 return megcoreSuccess;
32}
33
34std::atomic_bool megcore::ROCMContext::sm_miopen_algo_search{false};
35megcoreStatus_t megcore::enableMIOpenAlgoSearch(bool enable_algo_search) {

Callers

nothing calls this directly

Calls 4

megcoreGetPlatformFunction · 0.85
dev_handleMethod · 0.80
contextMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected