Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/executorch
/ nbytes
Method
nbytes
exir/tensor.py:189–190 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
187
return
self.allocated_memory
188
189
def
nbytes(self) -> int:
190
return
num_bytes_from_shape_and_dtype(self.shape, self.dtype)
191
192
@classmethod
193
def
from_tensor(cls, tensor: torch.Tensor, const: bool = False) -> TensorSpec:
Callers
15
from_tensor
Method · 0.80
__init__
Method · 0.80
_tensor_spec_to_evalue
Method · 0.80
placeholder
Method · 0.80
test_emit_weight_view
Method · 0.80
get_quant_params
Method · 0.80
get_serialized_buffer_index
Method · 0.80
get_serialized_data
Method · 0.80
serialize_constant_tensors
Function · 0.80
maybe_add_constant_tensor
Method · 0.80
test_serialize_vulkan_binary
Method · 0.80
_emit_bundled_tensor
Method · 0.80
Calls
1
num_bytes_from_shape_and_dtype
Function · 0.85
Tested by
5
test_emit_weight_view
Method · 0.64
test_serialize_vulkan_binary
Method · 0.64
test_method_meta
Method · 0.64
test_program_method_meta
Method · 0.64
test_method_method_meta
Method · 0.64