MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / LstmStates

Method LstmStates

dnn/src/arm_common/lstm/lstm_utils.cpp:38–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38LstmStates::LstmStates(
39 const SmallVector<RefPtr> ptr, size_t hidden_size, size_t batch_size,
40 DType dtype) {
41 auto& h_ptr = ptr[0];
42 auto& c_ptr = ptr[1];
43 TensorLayout layout{{batch_size, hidden_size}, dtype};
44 m_h = TensorND(layout, h_ptr);
45 m_c = TensorND(layout, c_ptr);
46 m_memory_size = layout.span().dist_byte();
47}
48
49TensorNDArray megdnn::arm_common::split_tensor(
50 _megdnn_tensor_in tensor, size_t nr_tensor, const TensorLayout& layout) {

Callers

nothing calls this directly

Calls 3

dist_byteMethod · 0.80
spanMethod · 0.80
TensorNDClass · 0.50

Tested by

no test coverage detected