已合并
重命名ThresholdCompileInfo为V2后缀 #9443
ly_cann_coder创建于 26 天前
重命名ThresholdCompileInfo为V2后缀 #9443
已合并
ly_cann_coder创建于 26 天前
3 个文件变更+12-12
@@ -180,7 +180,7 @@ ge::graphStatus ThresholdTiling::RunTiling()
180ge::graphStatus TilingForThreshold(gert::TilingContext* tilingContext)180ge::graphStatus TilingForThreshold(gert::TilingContext* tilingContext)
181{181{
182 OP_LOGD(tilingContext->GetNodeName(), "TilingForThreshold arch35 is running");182 OP_LOGD(tilingContext->GetNodeName(), "TilingForThreshold arch35 is running");
183- auto compileInfo = tilingContext->GetCompileInfo<ThresholdCompileInfo>();183+ auto compileInfo = tilingContext->GetCompileInfo<ThresholdV2CompileInfo>();
184 OP_CHECK_NULL_WITH_CONTEXT(tilingContext, compileInfo);184 OP_CHECK_NULL_WITH_CONTEXT(tilingContext, compileInfo);
185 ThresholdTiling baseOpTiling(tilingContext);185 ThresholdTiling baseOpTiling(tilingContext);
186 OP_LOGD(tilingContext->GetNodeName(), "ThresholdV2Tiling RunTiling start.");186 OP_LOGD(tilingContext->GetNodeName(), "ThresholdV2Tiling RunTiling start.");
@@ -189,7 +189,7 @@ ge::graphStatus TilingForThreshold(gert::TilingContext* tilingContext)
189 189 
190ge::graphStatus TilingPrepareForThreshold(gert::TilingParseContext* context)190ge::graphStatus TilingPrepareForThreshold(gert::TilingParseContext* context)
191{191{
192- auto compileInfoPtr = context->GetCompiledInfo<ThresholdCompileInfo>();192+ auto compileInfoPtr = context->GetCompiledInfo<ThresholdV2CompileInfo>();
193 OP_CHECK_NULL_WITH_CONTEXT(context, compileInfoPtr);193 OP_CHECK_NULL_WITH_CONTEXT(context, compileInfoPtr);
194 fe::PlatFormInfos* platformInfoPtr = context->GetPlatformInfo();194 fe::PlatFormInfos* platformInfoPtr = context->GetPlatformInfo();
195 OP_CHECK_NULL_WITH_CONTEXT(context, platformInfoPtr);195 OP_CHECK_NULL_WITH_CONTEXT(context, platformInfoPtr);
@@ -199,6 +199,6 @@ ge::graphStatus TilingPrepareForThreshold(gert::TilingParseContext* context)
199 return ge::GRAPH_SUCCESS;199 return ge::GRAPH_SUCCESS;
200}200}
201 201 
202-IMPL_OP_OPTILING(ThresholdV2).Tiling(TilingForThreshold).TilingParse<ThresholdCompileInfo>(TilingPrepareForThreshold);202+IMPL_OP_OPTILING(ThresholdV2).Tiling(TilingForThreshold).TilingParse<ThresholdV2CompileInfo>(TilingPrepareForThreshold);
203 203 
204-} // namespace optiling204+} // namespace optiling
@@ -21,14 +21,14 @@
21namespace optiling {21namespace optiling {
22using namespace Ops::NN::Optiling;22using namespace Ops::NN::Optiling;
23 23 
24-struct ThresholdCompileInfo {24+struct ThresholdV2CompileInfo {
25 uint64_t coreNum = 0;25 uint64_t coreNum = 0;
26 uint64_t ubSize = 0;26 uint64_t ubSize = 0;
27};27};
28 28 
29class ThresholdTiling {29class ThresholdTiling {
30public:30public:
31- explicit ThresholdTiling(gert::TilingContext* context) : tilingContext(context){};31+ explicit ThresholdTiling(gert::TilingContext* context) : tilingContext(context) {};
32 ge::graphStatus RunTiling();32 ge::graphStatus RunTiling();
33 33 
34protected:34protected:
@@ -39,8 +39,8 @@ using namespace optiling;
39 39 
40class ThresholdV2TilingTestParam {40class ThresholdV2TilingTestParam {
41public:41public:
42- void Prepare(ThresholdCompileInfo& compileInfo) const;42+ void Prepare(ThresholdV2CompileInfo& compileInfo) const;
43- void InvokeTilingFunc(ThresholdCompileInfo& compileInfo) const;43+ void InvokeTilingFunc(ThresholdV2CompileInfo& compileInfo) const;
44 void Test() const;44 void Test() const;
45 std::string socVersion;45 std::string socVersion;
46 std::string caseName;46 std::string caseName;
@@ -200,7 +200,7 @@ static gert::Shape BuildShape(const std::vector<int64_t>& shapeVec)
200 return shape;200 return shape;
201}201}
202 202 
203-void ThresholdV2TilingTestParam::Prepare(ThresholdCompileInfo& compileInfo) const203+void ThresholdV2TilingTestParam::Prepare(ThresholdV2CompileInfo& compileInfo) const
204{204{
205 compileInfo.coreNum = coreNum > 0 ? coreNum : 64;205 compileInfo.coreNum = coreNum > 0 ? coreNum : 64;
206 compileInfo.ubSize = 262144;206 compileInfo.ubSize = 262144;
@@ -251,7 +251,7 @@ void ThresholdV2TilingTestParam::Prepare(ThresholdCompileInfo& compileInfo) cons
251 InitPlatformInfo(socVersion, tilingContext, compileInfoStr);251 InitPlatformInfo(socVersion, tilingContext, compileInfoStr);
252}252}
253 253 
254-void ThresholdV2TilingTestParam::InvokeTilingFunc(ThresholdCompileInfo& compileInfo) const254+void ThresholdV2TilingTestParam::InvokeTilingFunc(ThresholdV2CompileInfo& compileInfo) const
255{255{
256 gert::StorageShape xShape;256 gert::StorageShape xShape;
257 gert::StorageShape thresholdShape;257 gert::StorageShape thresholdShape;
@@ -318,7 +318,7 @@ void ThresholdV2TilingTestParam::InvokeTilingFunc(ThresholdCompileInfo& compileI
318 318 
319void ThresholdV2TilingTestParam::Test() const319void ThresholdV2TilingTestParam::Test() const
320{320{
321- ThresholdCompileInfo compileInfo;321+ ThresholdV2CompileInfo compileInfo;
322 Prepare(compileInfo);322 Prepare(compileInfo);
323 InvokeTilingFunc(compileInfo);323 InvokeTilingFunc(compileInfo);
324}324}
@@ -357,4 +357,4 @@ TEST_F(TestThresholdV2Tiling, multiThread950)
357{357{
358 auto casesParams950 = GetParams("Ascend950");358 auto casesParams950 = GetParams("Ascend950");
359 TestMultiThread(casesParams950.data(), casesParams950.size(), 3);359 TestMultiThread(casesParams950.data(), casesParams950.size(), 3);
360-}360+}