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

Function optimize_shape_transforms

src/shape_transform_descriptor.cpp:2035–2042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2033}
2034
2035std::vector<operation> optimize_shape_transforms(const std::vector<std::size_t>& dims,
2036 const std::vector<operation>& ops)
2037{
2038 auto sd = shape_transform_descriptor::create(dims, ops);
2039 if(sd.empty())
2040 return ops;
2041 return sd.generate();
2042}
2043
2044// Replace broadcasted dimensions with size 1, and set the stride to the previous stride
2045static shape unbroadcast(const shape& s)

Callers 2

applyMethod · 0.85

Calls 2

emptyMethod · 0.45
generateMethod · 0.45

Tested by

no test coverage detected