MCPcopy Create free account
hub / github.com/MegEngine/MegCC / alloc_tensor

Function alloc_tensor

runtime/src/vm/common.h:31–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static inline TinyNNStatus alloc_tensor(Tensor* tensor, VM* vm) {
32 DeviceModel* model = get_active_device_model(vm);
33 return alloc_tensor_opt(tensor, &(model->opt));
34}
35
36static inline void free_dev_ptr(void* dev_ptr, VM* vm) {
37 if (dev_ptr) {

Callers 5

execute_subtensorFunction · 0.85
execute_setsubtensorFunction · 0.85
execute_broadcastFunction · 0.85
execute_shape_ofFunction · 0.85
executeFunction · 0.85

Calls 2

alloc_tensor_optFunction · 0.85
get_active_device_modelFunction · 0.70

Tested by

no test coverage detected