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

Function NewCopyNdPrimitive

oneflow/user/kernels/same_padding_kernel.cpp:32–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31template<typename Context>
32std::unique_ptr<ep::primitive::CopyNd> NewCopyNdPrimitive(Context* ctx) {
33 const auto& in_arg_pair = ctx->inputs().front();
34 const int64_t ndims =
35 ctx->TensorDesc4ArgNameAndIndex(in_arg_pair.first, in_arg_pair.second)->shape().NumAxes();
36 return ep::primitive::NewPrimitive<ep::primitive::CopyNdFactory>(ctx->device_type(), ndims);
37}
38
39auto FillPrimitiveExists() {
40 return hob::make_custom("FillPrimitiveExists", [](const user_op::KernelRegContext& ctx) {

Callers 3

CopyNdPrimitiveExistsFunction · 0.70
ComputeMethod · 0.70
ComputeMethod · 0.70

Calls 4

NumAxesMethod · 0.45
shapeMethod · 0.45
device_typeMethod · 0.45

Tested by

no test coverage detected