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

Method IsAvailable

compiler/lib/KernelGen/Arm/ArmCommon/Reduce.cpp:428–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426} // namespace
427
428bool ReduceKernel::IsAvailable(TContext* context) const {
429 auto data_type = context->getAttrStr("data_type");
430 auto operand_type = context->getAttrOprand("operand:0").dtype;
431 if (data_type == "DEFAULT" && operand_type == "f32") {
432 return true;
433 }
434 // TODO:implement int quantized operand_type
435 return false;
436}
437//! kernel gen
438std::string ReduceKernel::GetKernelSymbol(TContext* context) const {
439 std::stringstream ss;

Callers

nothing calls this directly

Calls 2

getAttrStrMethod · 0.80
getAttrOprandMethod · 0.80

Tested by

no test coverage detected