MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / GetFlatShape

Function GetFlatShape

oneflow/user/kernels/gather_kernel.cpp:27–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace {
26
27Shape GetFlatShape(ShapeView shape, int64_t axis) {
28 return Shape({shape.Count(0, axis), shape.At(axis), shape.Count(axis + 1)});
29}
30
31class GatherOpKernelCache final : public user_op::OpKernelCache {
32 public:

Callers 1

ComputeMethod · 0.70

Calls 3

ShapeClass · 0.50
CountMethod · 0.45
AtMethod · 0.45

Tested by

no test coverage detected