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

Function apply_on_physical_tensor

imperative/src/impl/ops/rng.cpp:710–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708
709template <typename Op>
710SmallVector<TensorPtr> apply_on_physical_tensor(
711 const OpDef& def, const SmallVector<TensorPtr>& inputs,
712 SmallVector<LogicalTensorDesc>& output_descs, const bool& validated) {
713 SmallVector<TensorPtr> outputs;
714 SmallVector<LogicalTensorDesc> desc = infer_output_attrs<Op>(def, inputs);
715 for (auto&& i : desc) {
716 outputs.push_back(Tensor::make(i.layout, i.comp_node));
717 }
718 exec<Op>(def, inputs, outputs, {});
719 return outputs;
720}
721
722template <>
723SmallVector<TensorPtr> apply_on_physical_tensor<MultiHeadAttn>(

Callers 13

runMethod · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
run_graphFunction · 0.50
check_rng_basicFunction · 0.50
dispatch_default_cpuMethod · 0.50

Calls 2

makeFunction · 0.70
push_backMethod · 0.45

Tested by 9

runMethod · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
run_graphFunction · 0.40
check_rng_basicFunction · 0.40