MCPcopy Create free account
hub / github.com/pytorch/executorch / build_tensor

Function build_tensor

backends/qualcomm/utils/utils.py:869–877  ·  view source on GitHub ↗
(tensors, dtype_map)

Source from the content-addressed store, hash-verified

867 }
868
869 def build_tensor(tensors, dtype_map):
870 ret = OrderedDict()
871 for t in tensors:
872 dtype = t.GetDataType()
873 dtype_torch = dtype_map.get(dtype, None)
874 assert dtype_torch is not None, f"unknown qnn data type {dtype}"
875 ret[t.GetName()] = torch.zeros(tuple(t.GetDims()), dtype=dtype_torch)
876
877 return ret
878
879 def preprocess_binary(ctx_bin, compiler_specs):
880 qnn_mgr = PyQnnManagerAdaptor.QnnManager(

Callers 1

from_context_binaryFunction · 0.85

Calls 2

zerosMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected