MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / FOR_RANGE

Function FOR_RANGE

oneflow/extension/python/py_compute.cpp:63–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 int dim_size = tensor->shape_view().NumAxes();
62 npy_intp dims[dim_size];
63 FOR_RANGE(size_t, i, 0, dim_size) { dims[i] = tensor->shape_view().At(i); }
64
65 void* data = TensorToMem(tensor);
66 auto* np_array =

Callers

nothing calls this directly

Calls 6

TensorToNumpyFunction · 0.85
NumpyToTensorFunction · 0.85
AtMethod · 0.45
shape_viewMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected