| 398 | |
| 399 | template <typename Opr> |
| 400 | PerformanceResult CCOprProxy<Opr>::exec( |
| 401 | Opr* opr, const TensorNDArray& tensors, KernelGen::Arch arch, |
| 402 | const BenchmarkOption& benchmark_option, const std::string& kernel_symbol, |
| 403 | const std::unordered_map<std::string, CCAttr>& proxy_attr, bool gen_dynamic) { |
| 404 | std::unordered_map<std::string, CCAttr> attr_map; |
| 405 | auto kernels = opr_fill_attr<Opr>(attr_map, opr, tensors, arch, proxy_attr); |
| 406 | auto output_idx = get_output_idx(opr); |
| 407 | output_idx.normalize((int)tensors.size()); |
| 408 | fill_operands(attr_map, tensors, output_idx, gen_dynamic); |
| 409 | CodeGenContext ctx(attr_map); |
| 410 | MGB_MARK_USED_VAR(call_kernel); |
| 411 | MGB_MARK_USED_VAR(gen_kernel); |
| 412 | #if MEGCC_TEST_GEN |
| 413 | gen_kernel(kernels, &ctx, arch, kernel_symbol, gen_dynamic); |
| 414 | return {}; |
| 415 | #else |
| 416 | //! call kernel |
| 417 | return call_kernel( |
| 418 | kernels, &ctx, tensors, benchmark_option, kernel_symbol, output_idx, |
| 419 | gen_dynamic); |
| 420 | #endif |
| 421 | } |
| 422 | |
| 423 | #undef FILL_MAP |
| 424 | #undef FILL_MAP_EX |
nothing calls this directly
no test coverage detected