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

Function NewPermutePrimitive

oneflow/user/kernels/transpose_kernel.cpp:48–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template<typename Context>
48std::unique_ptr<ep::primitive::Permute> NewPermutePrimitive(Context* ctx) {
49 const int64_t num_dims = ctx->TensorDesc4ArgNameAndIndex("output", 0)->shape().NumAxes();
50 return ep::primitive::NewPrimitive<ep::primitive::PermuteFactory>(ctx->device_type(), num_dims);
51}
52
53class TransposeKernel final : public OpKernel, public user_op::CudaGraphSupport {
54 public:

Callers 2

ComputeMethod · 0.70
PermutePrimitiveExistsFunction · 0.70

Calls 4

NumAxesMethod · 0.45
shapeMethod · 0.45
device_typeMethod · 0.45

Tested by

no test coverage detected