MCPcopy Create free account
hub / github.com/MegEngine/MegCC / fused_elemwise_exec

Method fused_elemwise_exec

compiler/test/kernel/common/src/cc_proxy.cpp:356–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354} // namespace
355
356void megcc::test::fused_elemwise_exec(
357 const TensorNDArray& tensors, KernelGen::Arch arch,
358 std::unordered_map<std::string, CCAttr>& proxy_attr,
359 const std::string& symbol) {
360 OutputScope output_idx{-1, -1};
361 output_idx.normalize((int)tensors.size());
362 fill_operands(proxy_attr, tensors, output_idx, false);
363 megcc::CodeGenContext ctx(proxy_attr);
364 auto kernels = megcc::KernelGen::KernelPack::GetKernel(
365 KernType::FusedElemwiseKernel, arch);
366#if MEGCC_TEST_GEN
367 gen_kernel(kernels, &ctx, arch, symbol, false);
368#else
369 //! call kernel
370 call_kernel(kernels, &ctx, tensors, {}, symbol, output_idx, false);
371#endif
372}
373
374namespace megcc {
375namespace test {

Callers

nothing calls this directly

Calls 4

fill_operandsFunction · 0.85
call_kernelFunction · 0.85
normalizeMethod · 0.80
gen_kernelFunction · 0.70

Tested by

no test coverage detected