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

Function LITE_get_tensor_device_id

lite/lite-c/src/tensor.cpp:209–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209int LITE_get_tensor_device_id(const LiteTensor tensor, int* device_id) {
210 LITE_CAPI_BEGIN();
211 LITE_ASSERT(tensor && device_id, "The tensor pass to LITE c_api is null");
212 *device_id = static_cast<lite::Tensor*>(tensor)->get_device_id();
213 LITE_CAPI_END();
214}
215
216int LITE_is_pinned_host(const LiteTensor tensor, int* is_pinned_host) {
217 LITE_CAPI_BEGIN();

Callers

nothing calls this directly

Calls 1

get_device_idMethod · 0.45

Tested by

no test coverage detected