MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / rep

Function rep

dnn/src/cuda/batched_matrix_mul/brute_force.cpp:70–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 auto config = prepare_sub_opr(args);
69
70 rep(n, N) {
71 TensorND A_, B_, C_;
72 auto tensor_n_from_batch = [n](const TensorND& in, TensorND& out) {
73 out.reset_ptr(static_cast<void*>(
74 static_cast<dt_byte*>(in.raw_ptr()) +
75 n * in.layout.stride[0] * in.layout.dtype.size()));
76 out.layout = in.layout.remove_axis(0);
77 };
78 tensor_n_from_batch(args.tensor_a, A_);
79 tensor_n_from_batch(args.tensor_b, B_);
80 tensor_n_from_batch(args.tensor_c, C_);
81 config.second->exec(A_, B_, C_, args.workspace);
82 }
83}

Callers 1

try_copy_last_contigMethod · 0.50

Calls 5

reset_ptrMethod · 0.80
remove_axisMethod · 0.80
raw_ptrMethod · 0.45
sizeMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected