Merged
fix(simulation): Register ERF pipe type and fallback unknown opcodes #6556
fix(simulation): Register ERF pipe type and fallback unknown opcodes #6556
Merged
zhiweiyuanAdd on Sep 21
Total: 2 files changed+7-6
@@ -115,15 +115,15 @@ int Tile::SizeinBytes()
115void TileOp::GetPipeType()115void TileOp::GetPipeType()
116{116{
117 auto coreTypeQuery = SCHED_CORE_PIPE_TYPE.find(opcode);117 auto coreTypeQuery = SCHED_CORE_PIPE_TYPE.find(opcode);
118- if (coreTypeQuery == SCHED_CORE_PIPE_TYPE.end() && !IsCall() && opcode != "LOOP") {
119- ASSERT(static_cast<unsigned>(CostModel::ForwardSimErrorScene::INVALID_PIPE_TYPE), false)
120- << ",[SIMULATION]: "
121- << "No pipe type corresponding to opcode is found. opcode=" << opcode;
122- }
123 if (IsCall()) {118 if (IsCall()) {
124 pipeType = CorePipeType::PIPE_CALL;119 pipeType = CorePipeType::PIPE_CALL;
125- } else {120+ } else if (coreTypeQuery != SCHED_CORE_PIPE_TYPE.end()) {
126 pipeType = coreTypeQuery->second;121 pipeType = coreTypeQuery->second;
122+ } else {
123+ SIMULATION_LOGW("[SIMULATION]: No pipe type corresponding to opcode is found, "
124+ "fallback to PIPE_VECTOR_ALU. opcode=%s",
125+ opcode.c_str());
126+ pipeType = CorePipeType::PIPE_VECTOR_ALU;
127 }127 }
128}128}
129 129 
@@ -97,6 +97,7 @@ const std::map<std::string, CorePipeType> SCHED_CORE_PIPE_TYPE{// Unary Vector
97 {"ATAN", CorePipeType::PIPE_VECTOR_ALU},97 {"ATAN", CorePipeType::PIPE_VECTOR_ALU},
98 {"ASIN", CorePipeType::PIPE_VECTOR_ALU},98 {"ASIN", CorePipeType::PIPE_VECTOR_ALU},
99 {"ACOS", CorePipeType::PIPE_VECTOR_ALU},99 {"ACOS", CorePipeType::PIPE_VECTOR_ALU},
100+ {"ERF", CorePipeType::PIPE_VECTOR_ALU},
100 {"ERFC", CorePipeType::PIPE_VECTOR_ALU},101 {"ERFC", CorePipeType::PIPE_VECTOR_ALU},
101 {"Log1p", CorePipeType::PIPE_VECTOR_ALU},102 {"Log1p", CorePipeType::PIPE_VECTOR_ALU},
102 // Binary Vector103 // Binary Vector