Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaddlePaddle/Paddle
/ num_elements
Method
num_elements
paddle/cinn/runtime/buffer.cc:57–61 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
55
}
56
57
uint32_t Shape::num_elements() const {
58
uint32_t res = ndims_ > 0 ? 1 : 0;
59
for (int i = 0; i < ndims(); i++) res *= (*this)[i];
60
return res;
61
}
62
63
} // namespace runtime
64
} // namespace cinn
Callers
13
CreateDeviceBuffer
Method · 0.45
Build
Method · 0.45
AllocHost
Method · 0.45
cinn_x86_malloc
Function · 0.45
cinn_call_cnnl_gaussian_random
Function · 0.45
cinn_call_cnnl_uniform_random
Function · 0.45
cinn_call_cnnl_randint
Function · 0.45
__cinn_host_tanh_v
Function · 0.45
cinn_call_cholesky_nvgpu
Function · 0.45
cinn_call_triangular_solve_nvgpu
Function · 0.45
cinn_call_gaussian_random
Function · 0.45
cinn_call_uniform_random
Function · 0.45
Calls
no outgoing calls
Tested by
2
CreateDeviceBuffer
Method · 0.36
Build
Method · 0.36