已合并
arch代替soc version整改 #1826
wangxun21创建于 3月23日
arch代替soc version整改 #1826
已合并
共 3 个文件变更+6-10
| @@ -52,7 +52,6 @@ ge::graphStatus DynamicStitchTilingClass::GetPlatformInfo() | |||
| 52 | auto platformInfo = context_->GetPlatformInfo(); | 52 | auto platformInfo = context_->GetPlatformInfo(); |
| 53 | if (platformInfo != nullptr) { | 53 | if (platformInfo != nullptr) { |
| 54 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); | 54 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); |
| 55 | - socVersion_ = ascendcPlatform.GetSocVersion(); | ||
| 56 | aicoreParams_.numBlocks = ascendcPlatform.GetCoreNumAiv(); | 55 | aicoreParams_.numBlocks = ascendcPlatform.GetCoreNumAiv(); |
| 57 | uint64_t ubSizePlatForm; | 56 | uint64_t ubSizePlatForm; |
| 58 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatForm); | 57 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatForm); |
| @@ -62,7 +61,6 @@ ge::graphStatus DynamicStitchTilingClass::GetPlatformInfo() | |||
| 62 | OP_CHECK_IF( | 61 | OP_CHECK_IF( |
| 63 | compileInfoPtr == nullptr, OP_LOGE(context_->GetNodeName(), "compile info is null"), | 62 | compileInfoPtr == nullptr, OP_LOGE(context_->GetNodeName(), "compile info is null"), |
| 64 | return ge::GRAPH_FAILED); | 63 | return ge::GRAPH_FAILED); |
| 65 | - socVersion_ = compileInfoPtr->socVersion; | ||
| 66 | aicoreParams_.numBlocks = compileInfoPtr->blockDim; | 64 | aicoreParams_.numBlocks = compileInfoPtr->blockDim; |
| 67 | aicoreParams_.ubSize = compileInfoPtr->ubSize; | 65 | aicoreParams_.ubSize = compileInfoPtr->ubSize; |
| 68 | } | 66 | } |
| @@ -558,7 +556,6 @@ static ge::graphStatus TilingPrepare4DynamicStitchTiling(gert::TilingParseContex | |||
| 558 | auto compileInfoPtr = context->GetCompiledInfo<DynamicStitchCompileInfo>(); | 556 | auto compileInfoPtr = context->GetCompiledInfo<DynamicStitchCompileInfo>(); |
| 559 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr); | 557 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr); |
| 560 | compileInfoPtr->blockDim = ascendcPlatform.GetCoreNum(); | 558 | compileInfoPtr->blockDim = ascendcPlatform.GetCoreNum(); |
| 561 | - compileInfoPtr->socVersion = ascendcPlatform.GetSocVersion(); | ||
| 562 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, compileInfoPtr->ubSize); | 559 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, compileInfoPtr->ubSize); |
| 563 | return ge::GRAPH_SUCCESS; | 560 | return ge::GRAPH_SUCCESS; |
| 564 | } | 561 | } |
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | + | ||
| 31 | 32 | ||
| 32 | using namespace Ops::Math::OpTiling; | 33 | using namespace Ops::Math::OpTiling; |
| 33 | 34 | ||
| @@ -35,7 +36,6 @@ namespace optiling { | |||
| 35 | struct DynamicStitchCompileInfo { | 36 | struct DynamicStitchCompileInfo { |
| 36 | uint64_t blockDim; | 37 | uint64_t blockDim; |
| 37 | uint64_t ubSize; | 38 | uint64_t ubSize; |
| 38 | - platform_ascendc::SocVersion socVersion; | ||
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | enum class SliceDivisorType : int64_t | 41 | enum class SliceDivisorType : int64_t |
| @@ -62,7 +62,7 @@ protected: | |||
| 62 | ge::graphStatus GetPlatformInfo() override; | 62 | ge::graphStatus GetPlatformInfo() override; |
| 63 | bool IsCapable() override | 63 | bool IsCapable() override |
| 64 | { | 64 | { |
| 65 | - return socVersion_ == platform_ascendc::SocVersion::ASCEND950; | 65 | + return IsRegbaseSocVersion(context_); |
| 66 | } | 66 | } |
| 67 | ge::graphStatus DoOpTiling() override; | 67 | ge::graphStatus DoOpTiling() override; |
| 68 | ge::graphStatus DoLibApiTiling() override | 68 | ge::graphStatus DoLibApiTiling() override |
| @@ -94,7 +94,6 @@ private: | |||
| 94 | void PrintTiling() const; | 94 | void PrintTiling() const; |
| 95 | bool IsBigSliceSize() const; | 95 | bool IsBigSliceSize() const; |
| 96 | 96 | ||
| 97 | - platform_ascendc::SocVersion socVersion_ = platform_ascendc::SocVersion::ASCEND950; | ||
| 98 | ge::DataType dataType_ = ge::DT_UNDEFINED; | 97 | ge::DataType dataType_ = ge::DT_UNDEFINED; |
| 99 | int64_t clrBlockNum_{0}; | 98 | int64_t clrBlockNum_{0}; |
| 100 | int64_t clrBlockWsSize_{0}; | 99 | int64_t clrBlockWsSize_{0}; |
| @@ -42,7 +42,7 @@ class DynamicStitchTilingTest : public testing::Test { | |||
| 42 | 42 | ||
| 43 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_1) | 43 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_1) |
| 44 | { | 44 | { |
| 45 | - optiling::DynamicStitchCompileInfo compileInfo = {64, 245760, platform_ascendc::SocVersion::ASCEND950}; | 45 | + optiling::DynamicStitchCompileInfo compileInfo = {64, 245760}; |
| 46 | gert::TilingContextPara tilingContextPara("DynamicStitch", | 46 | gert::TilingContextPara tilingContextPara("DynamicStitch", |
| 47 | { | 47 | { |
| 48 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, | 48 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, |
| @@ -62,7 +62,7 @@ TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_1) | |||
| 62 | 62 | ||
| 63 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_multi_dim_slice) | 63 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_multi_dim_slice) |
| 64 | { | 64 | { |
| 65 | - optiling::DynamicStitchCompileInfo compileInfo = {64, 245760, platform_ascendc::SocVersion::ASCEND950}; | 65 | + optiling::DynamicStitchCompileInfo compileInfo = {64, 245760}; |
| 66 | gert::TilingContextPara tilingContextPara("DynamicStitch", | 66 | gert::TilingContextPara tilingContextPara("DynamicStitch", |
| 67 | { | 67 | { |
| 68 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, | 68 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, |
| @@ -82,7 +82,7 @@ TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_multi_dim_slice) | |||
| 82 | 82 | ||
| 83 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_for_zero_slice) | 83 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_for_zero_slice) |
| 84 | { | 84 | { |
| 85 | - optiling::DynamicStitchCompileInfo compileInfo = {64, 245760, platform_ascendc::SocVersion::ASCEND950}; | 85 | + optiling::DynamicStitchCompileInfo compileInfo = {64, 245760}; |
| 86 | gert::TilingContextPara tilingContextPara("DynamicStitch", | 86 | gert::TilingContextPara tilingContextPara("DynamicStitch", |
| 87 | { | 87 | { |
| 88 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, | 88 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, |
| @@ -102,7 +102,7 @@ TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_for_zero_slice) | |||
| 102 | 102 | ||
| 103 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_for_large_slice) | 103 | TEST_F(DynamicStitchTilingTest, DynamicStitchTiling_tiling_test_for_large_slice) |
| 104 | { | 104 | { |
| 105 | - optiling::DynamicStitchCompileInfo compileInfo = {64, 245760, platform_ascendc::SocVersion::ASCEND950}; | 105 | + optiling::DynamicStitchCompileInfo compileInfo = {64, 245760}; |
| 106 | gert::TilingContextPara tilingContextPara("DynamicStitch", | 106 | gert::TilingContextPara tilingContextPara("DynamicStitch", |
| 107 | { | 107 | { |
| 108 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, | 108 | {{{24, 4, 128}, {24, 4, 128}}, ge::DT_INT32, ge::FORMAT_ND}, |