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

Method IsAvailable

compiler/lib/KernelGen/GeneralIntrinsic/Reduce.cpp:605–613  ·  view source on GitHub ↗

namespace

Source from the content-addressed store, hash-verified

603
604} // namespace
605bool ReduceKernel::IsAvailable(TContext* context) const {
606 auto data_type = context->getAttrStr("data_type");
607 auto operand_type = context->getAttrOprand("operand:0").dtype;
608 if (data_type == "DEFAULT" && (operand_type == "f32" || operand_type == "f16")) {
609 return true;
610 }
611 // TODO:implement int quantized operand_type
612 return false;
613}
614//! kernel gen
615std::string ReduceKernel::GetKernelSymbol(TContext* context) const {
616 std::stringstream ss;

Callers

nothing calls this directly

Calls 2

getAttrStrMethod · 0.80
getAttrOprandMethod · 0.80

Tested by

no test coverage detected