MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / parse

Method parse

src/tf/parse_softmax.cpp:39–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 std::vector<op_desc> operators() const { return {{"Softmax"}}; }
38
39 instruction_ref parse(const op_desc& /*opd*/,
40 const tf_parser& /*parser*/,
41 tf_parser::node_info info,
42 std::vector<instruction_ref> args) const
43 {
44 int axis = -1;
45 auto num_dims = args[0]->get_shape().lens().size();
46 if(contains(info.attributes, "axis"))
47 {
48 axis = static_cast<int>(info.attributes.at("axis").i());
49 }
50
51 axis = tune_axis(num_dims, axis, "tf_parse_softmax");
52
53 return info.add_instruction(make_op("softmax", {{"axis", axis}}),
54 info.make_contiguous(args[0]));
55 }
56};
57
58} // namespace tf

Callers

nothing calls this directly

Calls 9

containsFunction · 0.85
tune_axisFunction · 0.85
lensMethod · 0.80
atMethod · 0.80
make_opFunction · 0.50
sizeMethod · 0.45
get_shapeMethod · 0.45
add_instructionMethod · 0.45
make_contiguousMethod · 0.45

Tested by

no test coverage detected