| 33 | } |
| 34 | |
| 35 | megcoreStatus_t megcore::getAtlasContext( |
| 36 | megcoreComputingHandle_t handle, AtlasContext* ctx) { |
| 37 | auto&& H = handle; |
| 38 | megdnn_assert(H); |
| 39 | megcoreDeviceHandle_t dev_handle = H->content->dev_handle(); |
| 40 | megcorePlatform_t platform; |
| 41 | megcoreGetPlatform(dev_handle, &platform); |
| 42 | megdnn_assert(platform == megcorePlatformAtlas); |
| 43 | auto context = |
| 44 | static_cast<megcore::atlas::AtlasComputingContext*>(H->content.get()); |
| 45 | *ctx = context->context(); |
| 46 | return megcoreSuccess; |
| 47 | } |
| 48 | |
| 49 | const char* megcore::atlas::get_error_str(aclError error) { |
| 50 | #define ERROR(_err) \ |
nothing calls this directly
no test coverage detected