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

Function get_permutation

src/layout_convolution.cpp:41–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40namespace {
41std::vector<int64_t> get_permutation(instruction_ref ins, const layout_convolution& lc)
42{
43 std::vector<int64_t> perm(ins->get_shape().ndim());
44 if(lc.channels_last)
45 {
46 std::iota(perm.begin() + 1, perm.end() - 1, 2);
47 perm.back() = 1;
48 }
49 else
50 {
51 std::iota(perm.begin(), perm.end(), 0);
52 }
53 return perm;
54}
55
56std::vector<int64_t> get_default_permutation(instruction_ref ins)
57{

Callers 1

transform_convolutionsFunction · 0.85

Calls 6

iotaFunction · 0.85
ndimMethod · 0.80
backMethod · 0.80
get_shapeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected