Merged
feat(platform): Modify Platform config #6227
niulinkaiAdd on Sep 12
feat(platform): Modify Platform config #6227
Merged
Merged from2501_92924845/pyptosfplatformintocann/pypto9.2.0
Total: 23 files changed+1530-417
| @@ -148,13 +148,17 @@ if (ENABLE_FEATURE_PYTHON_FRONT_END) | |||
| 148 | framework/src/interface/configs/tile_fwk_types.json | 148 | framework/src/interface/configs/tile_fwk_types.json |
| 149 | framework/src/interface/configs/tile_fwk_config_schema.json | 149 | framework/src/interface/configs/tile_fwk_config_schema.json |
| 150 | framework/src/platform/parser/platforminfo.ini | 150 | framework/src/platform/parser/platforminfo.ini |
| 151 | - framework/src/platform/parser/simulation_platform/platform_config/A2A3.ini | 151 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend910B1.ini |
| 152 | - framework/src/platform/parser/simulation_platform/platform_config/950DT_957x.ini | 152 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend910B2.ini |
| 153 | - framework/src/platform/parser/simulation_platform/platform_config/950PR_957x.ini | 153 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend910B3.ini |
| 154 | - framework/src/platform/parser/simulation_platform/platform_config/950DT_9581.ini | 154 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend910B4.ini |
| 155 | - framework/src/platform/parser/simulation_platform/platform_config/950DT_9581x.ini | 155 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend910_9363.ini |
| 156 | - framework/src/platform/parser/simulation_platform/platform_config/950DT_958x.ini | 156 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9572.ini |
| 157 | - framework/src/platform/parser/simulation_platform/platform_config/950PR_958x.ini | 157 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend950PR_9579.ini |
| 158 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9581.ini | ||
| 159 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9581X.ini | ||
| 160 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9582.ini | ||
| 161 | + framework/src/platform/parser/simulation_platform/platform_config/Ascend950PR_9589.ini | ||
| 158 | framework/src/platform/parser/simulation_platform/platform_config/Kirin9030.ini | 162 | framework/src/platform/parser/simulation_platform/platform_config/Kirin9030.ini |
| 159 | framework/src/platform/parser/simulation_platform/platform_config/KirinX90.ini | 163 | framework/src/platform/parser/simulation_platform/platform_config/KirinX90.ini |
| 160 | DESTINATION ${PyPTO_WhlName}/lib/configs | 164 | DESTINATION ${PyPTO_WhlName}/lib/configs |
| @@ -29,44 +29,64 @@ | |||
| 29 | #include "cann_host_runtime.h" | 29 | #include "cann_host_runtime.h" |
| 30 | 30 | ||
| 31 | namespace npu::tile_fwk { | 31 | namespace npu::tile_fwk { |
| 32 | +// Standard soc_version (chip bin within a soc_series), consistent with CANN platform_config ini naming, | ||
| 33 | +// e.g. Ascend950PR_9589 / Ascend910B2 / Kirin9030. One ini file per soc_version. | ||
| 32 | enum class DPlatform { | 34 | enum class DPlatform { |
| 33 | ASCEND_910B1, | 35 | ASCEND_910B1, |
| 34 | ASCEND_910B2, | 36 | ASCEND_910B2, |
| 35 | ASCEND_910B3, | 37 | ASCEND_910B3, |
| 36 | ASCEND_910B4, | 38 | ASCEND_910B4, |
| 37 | - ASCEND_910C4, | 39 | + ASCEND_910_9363, |
| 40 | + ASCEND_950DT_9572, | ||
| 38 | ASCEND_950PR_9579, | 41 | ASCEND_950PR_9579, |
| 39 | - ASCEND_950DT_9582, | ||
| 40 | - ASCEND_950PR_9582, | ||
| 41 | - ASCEND_950DT_9579, | ||
| 42 | - KIRIN_9030, | ||
| 43 | - KIRIN_X90, | ||
| 44 | ASCEND_950DT_9581, | 42 | ASCEND_950DT_9581, |
| 45 | ASCEND_950DT_9581X, | 43 | ASCEND_950DT_9581X, |
| 44 | + ASCEND_950DT_9582, | ||
| 45 | + ASCEND_950PR_9589, | ||
| 46 | + KIRIN_9030, | ||
| 47 | + KIRIN_X90, | ||
| 46 | 48 | ||
| 47 | UNKNOWN_DEVICE, | 49 | UNKNOWN_DEVICE, |
| 48 | }; | 50 | }; |
| 49 | 51 | ||
| 50 | -inline DPlatform StringToDpaltform(std::string platform) | 52 | +inline DPlatform StringToDPlatform(std::string platform) |
| 51 | { | 53 | { |
| 52 | - std::unordered_map<std::string, DPlatform> mappings = { | 54 | + const std::unordered_map<std::string, DPlatform> mappings = { |
| 55 | + {"Ascend910B1", DPlatform::ASCEND_910B1}, | ||
| 56 | + {"Ascend910B2", DPlatform::ASCEND_910B2}, | ||
| 57 | + {"Ascend910B3", DPlatform::ASCEND_910B3}, | ||
| 58 | + {"Ascend910B4", DPlatform::ASCEND_910B4}, | ||
| 59 | + {"Ascend910_9363", DPlatform::ASCEND_910_9363}, | ||
| 60 | + {"Ascend950DT_9572", DPlatform::ASCEND_950DT_9572}, | ||
| 61 | + {"Ascend950PR_9579", DPlatform::ASCEND_950PR_9579}, | ||
| 62 | + {"Ascend950DT_9581", DPlatform::ASCEND_950DT_9581}, | ||
| 63 | + {"Ascend950DT_9581X", DPlatform::ASCEND_950DT_9581X}, | ||
| 64 | + {"Ascend950DT_9582", DPlatform::ASCEND_950DT_9582}, | ||
| 65 | + {"Ascend950PR_9589", DPlatform::ASCEND_950PR_9589}, | ||
| 66 | + {"Kirin9030", DPlatform::KIRIN_9030}, | ||
| 67 | + {"KirinX90", DPlatform::KIRIN_X90}, | ||
| 68 | + // Deprecated device_platform formats, kept for compatibility. Legacy values whose names did not | ||
| 69 | + // match the actual chip bin are mapped to the real soc_version of the ini they used to load: | ||
| 70 | + // ASCEND_950DT_9579 -> Ascend950DT_9572, ASCEND_950PR_9582 -> Ascend950PR_9589. | ||
| 53 | {"ASCEND_910B1", DPlatform::ASCEND_910B1}, | 71 | {"ASCEND_910B1", DPlatform::ASCEND_910B1}, |
| 54 | {"ASCEND_910B2", DPlatform::ASCEND_910B2}, | 72 | {"ASCEND_910B2", DPlatform::ASCEND_910B2}, |
| 55 | {"ASCEND_910B3", DPlatform::ASCEND_910B3}, | 73 | {"ASCEND_910B3", DPlatform::ASCEND_910B3}, |
| 56 | {"ASCEND_910B4", DPlatform::ASCEND_910B4}, | 74 | {"ASCEND_910B4", DPlatform::ASCEND_910B4}, |
| 57 | - {"ASCEND_910C4", DPlatform::ASCEND_910C4}, | 75 | + {"ASCEND_910_9363", DPlatform::ASCEND_910_9363}, |
| 76 | + {"ASCEND_950DT_9572", DPlatform::ASCEND_950DT_9572}, | ||
| 77 | + {"ASCEND_950DT_9579", DPlatform::ASCEND_950DT_9572}, | ||
| 58 | {"ASCEND_950PR_9579", DPlatform::ASCEND_950PR_9579}, | 78 | {"ASCEND_950PR_9579", DPlatform::ASCEND_950PR_9579}, |
| 59 | {"ASCEND_950DT_9581", DPlatform::ASCEND_950DT_9581}, | 79 | {"ASCEND_950DT_9581", DPlatform::ASCEND_950DT_9581}, |
| 60 | {"ASCEND_950DT_9581X", DPlatform::ASCEND_950DT_9581X}, | 80 | {"ASCEND_950DT_9581X", DPlatform::ASCEND_950DT_9581X}, |
| 81 | + {"ASCEND_950DT_9582", DPlatform::ASCEND_950DT_9582}, | ||
| 82 | + {"ASCEND_950PR_9582", DPlatform::ASCEND_950PR_9589}, | ||
| 83 | + {"ASCEND_950PR_9589", DPlatform::ASCEND_950PR_9589}, | ||
| 61 | {"KIRIN_9030", DPlatform::KIRIN_9030}, | 84 | {"KIRIN_9030", DPlatform::KIRIN_9030}, |
| 62 | {"KIRIN_X90", DPlatform::KIRIN_X90}, | 85 | {"KIRIN_X90", DPlatform::KIRIN_X90}, |
| 63 | - {"ASCEND_950DT_9582", DPlatform::ASCEND_950DT_9582}, | ||
| 64 | - {"ASCEND_950PR_9582", DPlatform::ASCEND_950PR_9582}, | ||
| 65 | - {"ASCEND_950DT_9579", DPlatform::ASCEND_950DT_9579}, | ||
| 66 | }; | 86 | }; |
| 67 | 87 | ||
| 68 | - if (mappings.count(platform)) { | 88 | + if (mappings.count(platform) != 0) { |
| 69 | - return mappings[platform]; | 89 | + return mappings.at(platform); |
| 70 | } | 90 | } |
| 71 | 91 | ||
| 72 | return DPlatform::UNKNOWN_DEVICE; | 92 | return DPlatform::UNKNOWN_DEVICE; |
| @@ -386,13 +406,41 @@ inline std::string NPUArchToString(NPUArch npu_arch) | |||
| 386 | 406 | ||
| 387 | inline bool IsLiteNPU(NPUArch arch) { return arch == NPUArch::DAV_3113 || arch == NPUArch::DAV_3003; } | 407 | inline bool IsLiteNPU(NPUArch arch) { return arch == NPUArch::DAV_3113 || arch == NPUArch::DAV_3003; } |
| 388 | 408 | ||
| 409 | +// NPU_ARCH (core architecture) of each standard soc_version, consistent with the NpuArch key | ||
| 410 | +// in CANN platform_config ini, e.g. Ascend950PR_9589 -> 3510, Ascend910B2 -> 2201. | ||
| 411 | +inline NPUArch DPlatformToNPUArch(DPlatform platform) | ||
| 412 | +{ | ||
| 413 | + switch (platform) { | ||
| 414 | + case DPlatform::ASCEND_910B1: | ||
| 415 | + case DPlatform::ASCEND_910B2: | ||
| 416 | + case DPlatform::ASCEND_910B3: | ||
| 417 | + case DPlatform::ASCEND_910B4: | ||
| 418 | + case DPlatform::ASCEND_910_9363: | ||
| 419 | + return NPUArch::DAV_2201; | ||
| 420 | + case DPlatform::ASCEND_950DT_9572: | ||
| 421 | + case DPlatform::ASCEND_950PR_9579: | ||
| 422 | + case DPlatform::ASCEND_950DT_9581: | ||
| 423 | + case DPlatform::ASCEND_950DT_9581X: | ||
| 424 | + case DPlatform::ASCEND_950DT_9582: | ||
| 425 | + case DPlatform::ASCEND_950PR_9589: | ||
| 426 | + return NPUArch::DAV_3510; | ||
| 427 | + case DPlatform::KIRIN_9030: | ||
| 428 | + return NPUArch::DAV_3113; | ||
| 429 | + case DPlatform::KIRIN_X90: | ||
| 430 | + return NPUArch::DAV_3003; | ||
| 431 | + default: | ||
| 432 | + return NPUArch::DAV_UNKNOWN; | ||
| 433 | + } | ||
| 434 | +} | ||
| 435 | + | ||
| 389 | enum class SoCAICToAIVCoreRatio { ONE_AIC_TO_ONE_AIV_CORE, ONE_AIC_TO_TWO_AIV_CORE, UNSUPPORTED_AIC_TO_AIV_CORE_RATIO }; | 436 | enum class SoCAICToAIVCoreRatio { ONE_AIC_TO_ONE_AIV_CORE, ONE_AIC_TO_TWO_AIV_CORE, UNSUPPORTED_AIC_TO_AIV_CORE_RATIO }; |
| 390 | 437 | ||
| 391 | class SoC { | 438 | class SoC { |
| 392 | private: | 439 | private: |
| 393 | Die die_; | 440 | Die die_; |
| 394 | NPUArch version_; | 441 | NPUArch version_; |
| 395 | - std::string short_soc_ver_; | 442 | + std::string soc_version_; |
| 443 | + std::string soc_series_; | ||
| 396 | size_t dies_cnt_; | 444 | size_t dies_cnt_; |
| 397 | size_t ai_core_cnt_; | 445 | size_t ai_core_cnt_; |
| 398 | size_t cube_core_cnt_; | 446 | size_t cube_core_cnt_; |
| @@ -404,14 +452,16 @@ public: | |||
| 404 | void SetDie(const Die& die) { die_ = die; } | 452 | void SetDie(const Die& die) { die_ = die; } |
| 405 | void SetNPUArch(NPUArch version) { version_ = version; } | 453 | void SetNPUArch(NPUArch version) { version_ = version; } |
| 406 | void SetNPUArch(const std::string& version); | 454 | void SetNPUArch(const std::string& version); |
| 407 | - void SetShortSocVersion(const std::string& version) { short_soc_ver_ = version; } | 455 | + void SetSocVersion(const std::string& version) { soc_version_ = version; } |
| 456 | + void SetSocSeries(const std::string& series) { soc_series_ = series; } | ||
| 408 | void SetDiesNum(size_t cnt) { dies_cnt_ = cnt; } | 457 | void SetDiesNum(size_t cnt) { dies_cnt_ = cnt; } |
| 409 | void SetCCECVersion(const std::unordered_map<std::string, std::string>& ver); | 458 | void SetCCECVersion(const std::unordered_map<std::string, std::string>& ver); |
| 410 | 459 | ||
| 411 | Die& GetDies() { return die_; } | 460 | Die& GetDies() { return die_; } |
| 412 | NPUArch GetNPUArch() const { return version_; } | 461 | NPUArch GetNPUArch() const { return version_; } |
| 413 | size_t GetDiesNum() const { return dies_cnt_; } | 462 | size_t GetDiesNum() const { return dies_cnt_; } |
| 414 | - std::string GetShortSocVersion() const { return short_soc_ver_; } | 463 | + std::string GetSocVersion() const { return soc_version_; } |
| 464 | + std::string GetSocSeries() const { return soc_series_; } | ||
| 415 | std::string GetCCECVersion(std::string CoreType); | 465 | std::string GetCCECVersion(std::string CoreType); |
| 416 | 466 | ||
| 417 | SoCAICToAIVCoreRatio GetAICToAIVCoreRatio() | 467 | SoCAICToAIVCoreRatio GetAICToAIVCoreRatio() |
| @@ -447,7 +497,8 @@ public: | |||
| 447 | std::stringstream ss; | 497 | std::stringstream ss; |
| 448 | ss << "{\n"; | 498 | ss << "{\n"; |
| 449 | ss << "SOC_INFO : {\n"; | 499 | ss << "SOC_INFO : {\n"; |
| 450 | - ss << " \"SHORT_SOC_VERSION\" : \"" << short_soc_ver_ << "\",\n"; | 500 | + ss << " \"SOC_VERSION\" : \"" << soc_version_ << "\",\n"; |
| 501 | + ss << " \"SOC_SERIES\" : \"" << soc_series_ << "\",\n"; | ||
| 451 | ss << " \"NPU_ARCH\" : " << static_cast<int>(version_) << ",\n"; | 502 | ss << " \"NPU_ARCH\" : " << static_cast<int>(version_) << ",\n"; |
| 452 | ss << " \"DIES_NUM\" : " << dies_cnt_ << ",\n"; | 503 | ss << " \"DIES_NUM\" : " << dies_cnt_ << ",\n"; |
| 453 | ss << " \"AI_CPU_NUM\" : " << ai_cpu_cnt_ << ",\n"; | 504 | ss << " \"AI_CPU_NUM\" : " << ai_cpu_cnt_ << ",\n"; |
| @@ -430,9 +430,12 @@ extern "C" __attribute__((visibility("default"))) int64_t GetCyclesForPass(const | |||
| 430 | const std::vector<std::vector<int>>& shape, | 430 | const std::vector<std::vector<int>>& shape, |
| 431 | DataType dtype) | 431 | DataType dtype) |
| 432 | { | 432 | { |
| 433 | - std::string archType = config::GetPlatformConfig("device_platform", "ASCEND_950PR_9579") == "ASCEND_950PR_9579" ? | 433 | + // Select the pipe simulator by the NPU_ARCH of the configured soc_version (not by machine type): |
| 434 | - "A5" : | 434 | + // NpuArch 3510 (Ascend950 series) -> "A5", NpuArch 2201/3113/3003 -> "A2A3" (cost model internal arch types). |
| 435 | - "A2A3"; | 435 | + // Both standard ("Ascend950PR_9579") and deprecated ("ASCEND_950PR_9579") device_platform formats are accepted. |
| 436 | + std::string socVersion = config::GetPlatformConfig("device_platform", "Ascend910B2"); | ||
| 437 | + NPUArch npuArch = DPlatformToNPUArch(StringToDPlatform(socVersion)); | ||
| 438 | + std::string archType = npuArch == NPUArch::DAV_3510 ? "A5" : "A2A3"; | ||
| 436 | auto simPtr = CreateSimulator(archType); | 439 | auto simPtr = CreateSimulator(archType); |
| 437 | return simPtr->PostSimulateForPass(op, shape, dtype); | 440 | return simPtr->PostSimulateForPass(op, shape, dtype); |
| 438 | } | 441 | } |
| @@ -400,8 +400,8 @@ void SetCodeGenConfig(const std::string& key, const T& value) | |||
| 400 | 400 | ||
| 401 | inline DPlatform GetDevicePlatform() | 401 | inline DPlatform GetDevicePlatform() |
| 402 | { | 402 | { |
| 403 | - auto platform = ConfigManager::Instance().GetPlatformConfig("device_platform", "ASCEND_910B2"); | 403 | + auto platform = ConfigManager::Instance().GetPlatformConfig("device_platform", "Ascend910B2"); |
| 404 | - return StringToDpaltform(platform); | 404 | + return StringToDPlatform(platform); |
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | inline const std::string GetAbsoluteTopFolder() { return RealPath(ConfigManager::Instance().LogTopFolder()); } | 407 | inline const std::string GetAbsoluteTopFolder() { return RealPath(ConfigManager::Instance().LogTopFolder()); } |
| @@ -20,7 +20,6 @@ | |||
| 20 | 20 | ||
| 21 | namespace npu { | 21 | namespace npu { |
| 22 | namespace tile_fwk { | 22 | namespace tile_fwk { |
| 23 | -const std::string platformConfigEnv = "PLATFORM_CONFIG_PATH"; | ||
| 24 | const std::string version = "version"; | 23 | const std::string version = "version"; |
| 25 | const std::string aic = "AIC"; | 24 | const std::string aic = "AIC"; |
| 26 | const std::string aiv = "AIV"; | 25 | const std::string aiv = "AIV"; |
Rframework/src/platform/parser/simulation_platform/platform_config/A2A3.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend910B1.ini+6-0
| @@ -12,6 +12,7 @@ CCEC_VECTOR_version=dav-c220-vec | |||
| 12 | Compiler_aicpu_support_os=true | 12 | Compiler_aicpu_support_os=true |
| 13 | Arch_type=4 | 13 | Arch_type=4 |
| 14 | NpuArch=2201 | 14 | NpuArch=2201 |
| 15 | +Chip_type=5 | ||
| 15 | 16 | ||
| 16 | [SoCInfo] | 17 | [SoCInfo] |
| 17 | ai_core_cnt=24 | 18 | ai_core_cnt=24 |
| @@ -23,6 +24,10 @@ memory_size=68719476736 | |||
| 23 | l2_type=0 | 24 | l2_type=0 |
| 24 | l2_size=201326592 | 25 | l2_size=201326592 |
| 25 | l2PageNum=64 | 26 | l2PageNum=64 |
| 27 | +normal_stream_num=32768 | ||
| 28 | +normal_stream_depth=2048 | ||
| 29 | +huge_stream_num=0 | ||
| 30 | +huge_stream_depth=0 | ||
| 26 | prefetch_num=8 | 31 | prefetch_num=8 |
| 27 | ffts_mode=ffts-plus | 32 | ffts_mode=ffts-plus |
| 28 | core_type_list=CubeCore,VectorCore | 33 | core_type_list=CubeCore,VectorCore |
| @@ -60,6 +65,7 @@ unzip_channels=2 | |||
| 60 | unzip_is_tight=1 | 65 | unzip_is_tight=1 |
| 61 | support_fixpipe=1 | 66 | support_fixpipe=1 |
| 62 | sparsity=1 | 67 | sparsity=1 |
| 68 | +padding_size=32 | ||
| 63 | 69 | ||
| 64 | [AICoreMemoryRates] | 70 | [AICoreMemoryRates] |
| 65 | ddr_rate=32 | 71 | ddr_rate=32 |
Rframework/src/platform/parser/simulation_platform/platform_config/910PR_9363.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend910B2.ini+283-277
| @@ -1,277 +1,283 @@ | |||
| 1 | -# [Platform Info configuration begin] | 1 | +# [Platform Info configuration begin] |
| 2 | -#************************************************************************************** | 2 | +#************************************************************************************** |
| 3 | -# | 3 | +# |
| 4 | -[version] | 4 | +[version] |
| 5 | -SoC_version=Ascend910C4 | 5 | +SoC_version=Ascend910B2 |
| 6 | -Short_SoC_version=Ascend910C4 | 6 | +Short_SoC_version=Ascend910B |
| 7 | -AIC_version=AIC-C-220 | 7 | +AIC_version=AIC-C-220 |
| 8 | -CCEC_AIC_version=dav-c220-cube | 8 | +CCEC_AIC_version=dav-c220-cube |
| 9 | -CCEC_AIV_version=dav-c220-vec | 9 | +CCEC_AIV_version=dav-c220-vec |
| 10 | -CCEC_CUBE_version=dav-c220-cube | 10 | +CCEC_CUBE_version=dav-c220-cube |
| 11 | -CCEC_VECTOR_version=dav-c220-vec | 11 | +CCEC_VECTOR_version=dav-c220-vec |
| 12 | -Compiler_aicpu_support_os=true | 12 | +Compiler_aicpu_support_os=true |
| 13 | -Arch_type=4 | 13 | +Arch_type=4 |
| 14 | -NpuArch=2201 | 14 | +NpuArch=2201 |
| 15 | - | 15 | +Chip_type=5 |
| 16 | -[SoCInfo] | 16 | + |
| 17 | -ai_core_cnt=24 | 17 | +[SoCInfo] |
| 18 | -cube_core_cnt=24 | 18 | +ai_core_cnt=24 |
| 19 | -vector_core_cnt=48 | 19 | +cube_core_cnt=24 |
| 20 | -ai_cpu_cnt=6 | 20 | +vector_core_cnt=48 |
| 21 | -memory_type= | 21 | +ai_cpu_cnt=6 |
| 22 | -memory_size=34359738368 | 22 | +memory_type= |
| 23 | -l2_type=0 | 23 | +memory_size=68719476736 |
| 24 | -l2_size=201326592 | 24 | +l2_type=0 |
| 25 | -l2PageNum=64 | 25 | +l2_size=201326592 |
| 26 | -prefetch_num=8 | 26 | +l2PageNum=64 |
| 27 | -ffts_mode=ffts-plus | 27 | +normal_stream_num=32768 |
| 28 | -core_type_list=CubeCore,VectorCore | 28 | +normal_stream_depth=2048 |
| 29 | -cube_vector_combine=split | 29 | +huge_stream_num=0 |
| 30 | -hardware_sync_betweencore=1 | 30 | +huge_stream_depth=0 |
| 31 | -vir_type_list=2,3,6,12,24 | 31 | +prefetch_num=8 |
| 32 | -support_bf16=1 | 32 | +ffts_mode=ffts-plus |
| 33 | -support_inf_nan=1 | 33 | +core_type_list=CubeCore,VectorCore |
| 34 | - | 34 | +cube_vector_combine=split |
| 35 | -[AICoreSpec] | 35 | +hardware_sync_betweencore=1 |
| 36 | -cube_freq=1850 | 36 | +vir_type_list=2,3,6,12,24 |
| 37 | -cube_m_size=16 | 37 | +support_bf16=1 |
| 38 | -cube_n_size=16 | 38 | +support_inf_nan=1 |
| 39 | -cube_k_size=16 | 39 | + |
| 40 | -vec_calc_size=128 | 40 | +[AICoreSpec] |
| 41 | -l0_a_size=65536 | 41 | +cube_freq=1800 |
| 42 | -l0_b_size=65536 | 42 | +cube_m_size=16 |
| 43 | -l0_c_size=131072 | 43 | +cube_n_size=16 |
| 44 | -l1_size=524288 | 44 | +cube_k_size=16 |
| 45 | -fb0_size=2048 | 45 | +vec_calc_size=128 |
| 46 | -fb1_size=1024 | 46 | +l0_a_size=65536 |
| 47 | -fb2_size=2048 | 47 | +l0_b_size=65536 |
| 48 | -fb3_size=2048 | 48 | +l0_c_size=131072 |
| 49 | -bt_size=1024 | 49 | +l1_size=524288 |
| 50 | -smask_buffer=0 | 50 | +fb0_size=2048 |
| 51 | -ub_size=196608 | 51 | +fb1_size=1024 |
| 52 | -ubblock_size=32 | 52 | +fb2_size=2048 |
| 53 | -ubbank_size=4096 | 53 | +fb3_size=2048 |
| 54 | -ubbank_num=64 | 54 | +bt_size=1024 |
| 55 | -ubburst_in_one_block=32 | 55 | +smask_buffer=0 |
| 56 | -ubbank_group_num=16 | 56 | +ub_size=196608 |
| 57 | -unzip_engines=4 | 57 | +ubblock_size=32 |
| 58 | -unzip_max_ratios=64 | 58 | +ubbank_size=4096 |
| 59 | -unzip_channels=2 | 59 | +ubbank_num=64 |
| 60 | -unzip_is_tight=1 | 60 | +ubburst_in_one_block=32 |
| 61 | -support_fixpipe=1 | 61 | +ubbank_group_num=16 |
| 62 | -sparsity=1 | 62 | +unzip_engines=4 |
| 63 | - | 63 | +unzip_max_ratios=64 |
| 64 | -[AICoreMemoryRates] | 64 | +unzip_channels=2 |
| 65 | -ddr_rate=32 | 65 | +unzip_is_tight=1 |
| 66 | -ddr_read_rate=32 | 66 | +support_fixpipe=1 |
| 67 | -ddr_write_rate=32 | 67 | +sparsity=1 |
| 68 | -l2_rate=110 | 68 | +padding_size=32 |
| 69 | -l2_read_rate=110 | 69 | + |
| 70 | -l2_write_rate=86 | 70 | +[AICoreMemoryRates] |
| 71 | -l1_to_l0_a_rate=512 | 71 | +ddr_rate=32 |
| 72 | -l1_to_l0_b_rate=256 | 72 | +ddr_read_rate=32 |
| 73 | -l1_to_ub_rate=128 | 73 | +ddr_write_rate=32 |
| 74 | -l0_c_to_ub_rate=256 | 74 | +l2_rate=110 |
| 75 | -ub_to_l2_rate=64 | 75 | +l2_read_rate=110 |
| 76 | -ub_to_ddr_rate=64 | 76 | +l2_write_rate=86 |
| 77 | -ub_to_l1_rate=128 | 77 | +l1_to_l0_a_rate=512 |
| 78 | - | 78 | +l1_to_l0_b_rate=256 |
| 79 | -[DtypeMKN] | 79 | +l1_to_ub_rate=128 |
| 80 | -Default=16,16,16 | 80 | +l0_c_to_ub_rate=256 |
| 81 | -DT_INT8=16,32,16 | 81 | +ub_to_l2_rate=64 |
| 82 | -DT_UINT8=16,32,16 | 82 | +ub_to_ddr_rate=64 |
| 83 | -DT_INT4=16,64,16 | 83 | +ub_to_l1_rate=128 |
| 84 | -DT_INT2=16,128,16 | 84 | + |
| 85 | -DT_UINT2=16,128,16 | 85 | +[DtypeMKN] |
| 86 | -DT_UINT1=16,256,16 | 86 | +Default=16,16,16 |
| 87 | - | 87 | +DT_INT8=16,32,16 |
| 88 | -[CPUCache] | 88 | +DT_UINT8=16,32,16 |
| 89 | -AICPUSyncBySW=0 | 89 | +DT_INT4=16,64,16 |
| 90 | -TSCPUSyncBySW=0 | 90 | +DT_INT2=16,128,16 |
| 91 | - | 91 | +DT_UINT2=16,128,16 |
| 92 | -[DSARandom] | 92 | +DT_UINT1=16,256,16 |
| 93 | -CounterWorkspaceSize=48 | 93 | + |
| 94 | - | 94 | +[CPUCache] |
| 95 | -[AICoreintrinsicDtypeMap] | 95 | +AICPUSyncBySW=0 |
| 96 | -0=Intrinsic_vrec|float16,float32 | 96 | +TSCPUSyncBySW=0 |
| 97 | -1=Intrinsic_vadd|float16,float32,int32,int16 | 97 | + |
| 98 | -2=Intrinsic_vadds|float16,float32,int32,int16 | 98 | +[DSARandom] |
| 99 | -3=Intrinsic_vsub|float16,float32,int32,int16 | 99 | +CounterWorkspaceSize=48 |
| 100 | -4=Intrinsic_vdiv|float16,float32 | 100 | + |
| @@ -0,0 +1,283 @@ | |||
| 1 | +# [Platform Info configuration begin] | ||
| 2 | +#************************************************************************************** | ||
| 3 | +# | ||
| 4 | +[version] | ||
| 5 | +SoC_version=Ascend910B3 | ||
| 6 | +Short_SoC_version=Ascend910B | ||
| 7 | +AIC_version=AIC-C-220 | ||
| 8 | +CCEC_AIC_version=dav-c220-cube | ||
| 9 | +CCEC_AIV_version=dav-c220-vec | ||
| 10 | +CCEC_CUBE_version=dav-c220-cube | ||
| 11 | +CCEC_VECTOR_version=dav-c220-vec | ||
| 12 | +Compiler_aicpu_support_os=true | ||
| 13 | +Arch_type=4 | ||
| 14 | +NpuArch=2201 | ||
| 15 | +Chip_type=5 | ||
| 16 | + | ||
| 17 | +[SoCInfo] | ||
| 18 | +ai_core_cnt=20 | ||
| 19 | +cube_core_cnt=20 | ||
| 20 | +vector_core_cnt=40 | ||
| 21 | +ai_cpu_cnt=6 | ||
| 22 | +memory_type= | ||
| 23 | +memory_size=68719476736 | ||
| 24 | +l2_type=0 | ||
| 25 | +l2_size=201326592 | ||
| 26 | +l2PageNum=64 | ||
| 27 | +normal_stream_num=32768 | ||
| 28 | +normal_stream_depth=2048 | ||
| 29 | +huge_stream_num=0 | ||
| 30 | +huge_stream_depth=0 | ||
| 31 | +prefetch_num=8 | ||
| 32 | +ffts_mode=ffts-plus | ||
| 33 | +core_type_list=CubeCore,VectorCore | ||
| 34 | +cube_vector_combine=split | ||
| 35 | +hardware_sync_betweencore=1 | ||
| 36 | +vir_type_list=4,5,10,20 | ||
| 37 | +support_bf16=1 | ||
| 38 | +support_inf_nan=1 | ||
| 39 | + | ||
| 40 | +[AICoreSpec] | ||
| 41 | +cube_freq=1800 | ||
| 42 | +cube_m_size=16 | ||
| 43 | +cube_n_size=16 | ||
| 44 | +cube_k_size=16 | ||
| 45 | +vec_calc_size=128 | ||
| 46 | +l0_a_size=65536 | ||
| 47 | +l0_b_size=65536 | ||
| 48 | +l0_c_size=131072 | ||
| 49 | +l1_size=524288 | ||
| 50 | +fb0_size=2048 | ||
| 51 | +fb1_size=1024 | ||
| 52 | +fb2_size=2048 | ||
| 53 | +fb3_size=2048 | ||
| 54 | +bt_size=1024 | ||
| 55 | +smask_buffer=0 | ||
| 56 | +ub_size=196608 | ||
| 57 | +ubblock_size=32 | ||
| 58 | +ubbank_size=4096 | ||
| 59 | +ubbank_num=64 | ||
| 60 | +ubburst_in_one_block=32 | ||
| 61 | +ubbank_group_num=16 | ||
| 62 | +unzip_engines=4 | ||
| 63 | +unzip_max_ratios=64 | ||
| 64 | +unzip_channels=2 | ||
| 65 | +unzip_is_tight=1 | ||
| 66 | +support_fixpipe=1 | ||
| 67 | +sparsity=1 | ||
| 68 | +padding_size=32 | ||
| 69 | + | ||
| 70 | +[AICoreMemoryRates] | ||
| 71 | +ddr_rate=32 | ||
| 72 | +ddr_read_rate=32 | ||
| 73 | +ddr_write_rate=32 | ||
| 74 | +l2_rate=110 | ||
| 75 | +l2_read_rate=110 | ||
| 76 | +l2_write_rate=86 | ||
| 77 | +l1_to_l0_a_rate=512 | ||
| 78 | +l1_to_l0_b_rate=256 | ||
| 79 | +l1_to_ub_rate=128 | ||
| 80 | +l0_c_to_ub_rate=256 | ||
| 81 | +ub_to_l2_rate=64 | ||
| 82 | +ub_to_ddr_rate=64 | ||
| 83 | +ub_to_l1_rate=128 | ||
| 84 | + | ||
| 85 | +[DtypeMKN] | ||
| 86 | +Default=16,16,16 | ||
| 87 | +DT_INT8=16,32,16 | ||
| 88 | +DT_UINT8=16,32,16 | ||
| 89 | +DT_INT4=16,64,16 | ||
| 90 | +DT_INT2=16,128,16 | ||
| 91 | +DT_UINT2=16,128,16 | ||
| 92 | +DT_UINT1=16,256,16 | ||
| 93 | + | ||
| 94 | +[CPUCache] | ||
| 95 | +AICPUSyncBySW=0 | ||
| 96 | +TSCPUSyncBySW=0 | ||
| 97 | + | ||
| 98 | +[DSARandom] | ||
| 99 | +CounterWorkspaceSize=48 | ||
| 100 | + | ||
| 101 | +[AICoreintrinsicDtypeMap] | ||
| 102 | +0=Intrinsic_vrec|float16,float32 | ||
| 103 | +1=Intrinsic_vadd|float16,float32,int32,int16 | ||
| 104 | +2=Intrinsic_vadds|float16,float32,int32,int16 | ||
| 105 | +3=Intrinsic_vsub|float16,float32,int32,int16 | ||
| 106 | +4=Intrinsic_vdiv|float16,float32 | ||
| 107 | +5=Intrinsic_vrsqrt|float16,float32 | ||
| 108 | +6=Intrinsic_vmul|float16,float32,int32,int16 | ||
| 109 | +7=Intrinsic_vmax|float16,float32,int32,int16 | ||
| 110 | +9=Intrinsic_vmin|float16,float32,int32,int16 | ||
| 111 | +10=Intrinsic_vln|float16,float32 | ||
| 112 | +11=Intrinsic_vexp|float16,float32 | ||
| 113 | +12=Intrinsic_vmuls|float16,float32,int32,int16 | ||
| 114 | +13=Intrinsic_vabs|float16,float32 | ||
| 115 | +14=Intrinsic_vcmax|float16,float32 | ||
| 116 | +15=Intrinsic_vcgmax|float16,float32 | ||
| 117 | +16=Intrinsic_vcmin|float16,float32 | ||
| 118 | +17=Intrinsic_vcgmin|float16,float32 | ||
| 119 | +18=Intrinsic_vcadd|float16,float32 | ||
| 120 | +19=Intrinsic_vcgadd|float16,float32 | ||
| 121 | +20=Intrinsic_vcpadd|float16,float32 | ||
| 122 | +24=Intrinsic_vconv|f322f32r,f322f32f,f322f32c,deq,f322f32a,f322f32z,f322f16,f322f16r,f322f16f,f322f16c,f322f16a,f322f16z,f322f16o,f322s64r,f322s64f,f322s64c,f322s64a,f322s64z,f322s32r,f322s32f,f322s32c,f322s32a,f322s32z,f322s16r,f322s16f,f322s16c,f322s16a,f322s16z,f162f32,f162s32r,f162s32f,f162s32c,f162s32a,f162s32z,f162s16r,f162s16f,f162s16c,f162s16a,f162s16z,f162s8,f162s8r,f162s8f,f162s8c,f162s8a,f162s8z,f162u8,f162u8r,f162u8f,f162u8c,f162u8a,f162u8z,u82f16,s82f16,s162f16,s162f16r,s162f16f,s162f16c,s162f16a,s162f16z,s162f32,s162s8,s162u8,s322f32,s322f32r,s322f32f,s322f32c,s322f32a,s322f32z,s322f16,s322s64,s322s16,s642s32,s642f32r,s642f32f,s642f32c,s642f32a,s642f32z,f322bf16r,f322bf16f,f322bf16c,f322bf16a,f322bf16z,bf162f32,bf162s32r,bf162s32f,bf162s32c,bf162s32a,bf162s32z | ||
| 123 | +25=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8,h322f32,f32f32f32,f322f32 | ||
| 124 | +26=Intrinsic_vor|int16,uint16 | ||
| 125 | +27=Intrinsic_vand|int16,uint16 | ||
| 126 | +28=Intrinsic_vaxpy|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 127 | +29=Intrinsic_vnot|int16,uint16 | ||
| 128 | +30=Intrinsic_vsqrt|float16,float32 | ||
| 129 | +31=Intrinsic_vrelu|float16,float32,int32 | ||
| 130 | +32=Intrinsic_vmla|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 131 | +33=Intrinsic_vmadd|float16,float32 | ||
| 132 | +34=Intrinsic_vmaddrelu|float16,float32 | ||
| 133 | +42=Intrinsic_vsel|float16,float32 | ||
| 134 | +43=Intrinsic_vcmp|float16,float32,int16 | ||
| 135 | +45=Intrinsic_vcmpv_ne|float16,float32 | ||
| 136 | +46=Intrinsic_vcmpv_eq|float16,float32,int32 | ||
| 137 | +47=Intrinsic_vcmpv_gt|float16,float32 | ||
| 138 | +48=Intrinsic_vcmpv_ge|float16,float32 | ||
| 139 | +49=Intrinsic_vcmpv_lt|float16,float32 | ||
| 140 | +50=Intrinsic_vcmpv_le|float16,float32 | ||
| 141 | +59=Intrinsic_sqrt|int64,float32 | ||
| 142 | +60=Intrinsic_abs|int64,float32 | ||
| 143 | +61=Intrinsic_bcnt0|uint64 | ||
| 144 | +62=Intrinsic_bcnt1|uint64 | ||
| 145 | +63=Intrinsic_clz|uint64 | ||
| 146 | +64=Intrinsic_max|int64,float32 | ||
| 147 | +65=Intrinsic_min|int64,float32 | ||
| 148 | +67=Intrinsic_vtranspose|uint16,int16,float16 | ||
| 149 | +71=Intrinsic_vlrelu|float16,float32 | ||
| 150 | +73=Intrinsic_vbitsort|float16 | ||
| 151 | +76=Intrinsic_vmrgsort4|float16 | ||
| 152 | +79=Intrinsic_vmulconv|u8f16f16,s8f16f16 | ||
| 153 | +104=Intrinsic_vnchwconv|int16,uint16,int8,uint8,float16,int32,uint32,float32 | ||
| 154 | +108=Intrinsic_vcmpvs_ne|float16,float32 | ||
| 155 | +109=Intrinsic_vcmpvs_eq|float16,float32,int32 | ||
| 156 | +110=Intrinsic_vcmpvs_gt|float16,float32 | ||
| 157 | +111=Intrinsic_vcmpvs_ge|float16,float32 | ||
| 158 | +112=Intrinsic_vcmpvs_lt|float16,float32 | ||
| 159 | +113=Intrinsic_vcmpvs_le|float16,float32 | ||
| 160 | +114=Intrinsic_vmaxs|float16,float32,int32,int16 | ||
| 161 | +115=Intrinsic_vmins|float16,float32,int32,int16 | ||
| 162 | +116=Intrinsic_vmaddrelu|float16,float32 | ||
| 163 | +117=Intrinsic_vgather|int16,uint16,float16,float32,int32,uint32 | ||
| 164 | +118=Intrinsic_vreduce|int16,uint16,float16,float32,int32,uint32 | ||
| 165 | +119=Intrinsic_vshr|uint16,int16,uint32,int32 | ||
| 166 | +120=Intrinsic_vgatherb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 167 | +121=Intrinsic_vbrcb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 168 | +122=Intrinsic_vbi|float16,float32 | ||
| 169 | +123=Intrinsic_data_move_pad|uint8,int8,uint16,int16,float16,int32,float32,uint32,bfloat16 | ||
| 170 | +124=Intrinsic_vreducev2|int16,uint16,float16,float32,int32,uint32 | ||
| 171 | +125=Intrinsic_vbitsort32|float16,float32 | ||
| 172 | +126=Intrinsic_vmrgsort4v2|float16,float32 | ||
| 173 | +127=Intrinsic_vshl|int16,uint16,int32,uint32 | ||
| 174 | +128=Intrinsic_vcopy|int16,uint16,float16,float32,int32,uint32 | ||
| 175 | +129=Intrinsic_data_move_out2l1|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 176 | +130=Intrinsic_data_move_out2l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 177 | +131=Intrinsic_data_move_out2l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 178 | +132=Intrinsic_data_move_l12l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 179 | +133=Intrinsic_data_move_l12l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 180 | +134=Intrinsic_data_move_l12out|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 181 | +135=Intrinsic_data_move_l12bt|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 182 | +136=Intrinsic_data_move_transpose_l12l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 183 | +137=Intrinsic_data_move_transpose_l12l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 184 | +138=Intrinsic_set_l1|f16,u16,s16,f32,s32,u32 | ||
| 185 | +139=Intrinsic_set_l0a|f16,u16,s16,f32,s32,u32 | ||
| 186 | +140=Intrinsic_set_l0b|f16,u16,s16,f32,s32,u32 | ||
| 187 | +141=Intrinsic_fix_pipe_l0c2l1|f32,s32,f16 | ||
| 188 | +142=Intrinsic_fix_pipe_l0c2out|f32,s32,f16 | ||
| 189 | +143=Intrinsic_fix_pipe_l12fb|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 190 | +144=Intrinsic_fix_pipe_support_multiple_output|true | ||
| 191 | +145=Intrinsic_fix_pipe_unit_list|pre_conv,pre_act,post_transform | ||
| 192 | +146=Intrinsic_fix_pipe_pre_conv_func_list|requant,dequant,quant,cast | ||
| 193 | +147=Intrinsic_fix_pipe_pre_conv_requant|s322s8,s322u8,s322s4 | ||
| 194 | +148=Intrinsic_fix_pipe_pre_conv_dequant|s322f16 | ||
| 195 | +149=Intrinsic_fix_pipe_pre_conv_quant|f322s8,f322u8,f322s4 | ||
| 196 | +150=Intrinsic_fix_pipe_pre_conv_cast|f322f16,f322bf16 | ||
| 197 | +151=Intrinsic_fix_pipe_pre_act_func_list|normal_relu,scalar_relu,vector_relu | ||
| 198 | +152=Intrinsic_fix_pipe_pre_act_normal_relu|f32,f16,bf16,s8,u8,s4,s32 | ||
| 199 | +153=Intrinsic_fix_pipe_pre_act_scalar_relu|f16,s8,u8,s4 | ||
| 200 | +154=Intrinsic_fix_pipe_pre_act_vector_relu|f16,s8,u8,s4 | ||
| 201 | +155=Intrinsic_fix_pipe_post_transform_func_list|nz2nd | ||
| 202 | +156=Intrinsic_fix_pipe_post_transform_nz2nd|f32,f16,bf16,s8,u8,s4,s32 | ||
| 203 | +157=Intrinsic_data_move_out2l1_nd2nz|u8,s8,f16,bf16,u16,s16,f32,s32,u32 | ||
| 204 | +158=Intrinsic_vaddrelu|int16,float16,float32 | ||
| 205 | + | ||
| 206 | +[CUBECoreintrinsicDtypeMap] | ||
| 207 | +0=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8 | ||
| 208 | + | ||
| 209 | +[VectorCoreintrinsicDtypeMap] | ||
| 210 | +0=Intrinsic_vrec|float16,float32 | ||
| 211 | +1=Intrinsic_vadd|float16,float32,int32,int16 | ||
| 212 | +2=Intrinsic_vadds|float16,float32,int32,int16 | ||
| 213 | +3=Intrinsic_vsub|float16,float32,int32,int16 | ||
| 214 | +4=Intrinsic_vdiv|float16,float32 | ||
| 215 | +5=Intrinsic_vrsqrt|float16,float32 | ||
| 216 | +6=Intrinsic_vmul|float16,float32,int32,int16 | ||
| 217 | +7=Intrinsic_vmax|float16,float32,int32,int16 | ||
| 218 | +9=Intrinsic_vmin|float16,float32,int32,int16 | ||
| 219 | +10=Intrinsic_vln|float16,float32 | ||
| 220 | +11=Intrinsic_vexp|float16,float32 | ||
| 221 | +12=Intrinsic_vmuls|float16,float32,int32,int16 | ||
| 222 | +13=Intrinsic_vabs|float16,float32 | ||
| 223 | +14=Intrinsic_vcmax|float16,float32 | ||
| 224 | +15=Intrinsic_vcgmax|float16,float32 | ||
| 225 | +16=Intrinsic_vcmin|float16,float32 | ||
| 226 | +17=Intrinsic_vcgmin|float16,float32 | ||
| 227 | +18=Intrinsic_vcadd|float16,float32 | ||
| 228 | +19=Intrinsic_vcgadd|float16,float32 | ||
| 229 | +20=Intrinsic_vcpadd|float16,float32 | ||
| 230 | +24=Intrinsic_vconv|f322f32r,f322f32f,f322f32c,deq,f322f32a,f322f32z,f322f16,f322f16r,f322f16f,f322f16c,f322f16a,f322f16z,f322f16o,f322s64r,f322s64f,f322s64c,f322s64a,f322s64z,f322s32r,f322s32f,f322s32c,f322s32a,f322s32z,f322s16r,f322s16f,f322s16c,f322s16a,f322s16z,f162f32,f162s32r,f162s32f,f162s32c,f162s32a,f162s32z,f162s16r,f162s16f,f162s16c,f162s16a,f162s16z,f162s8,f162s8r,f162s8f,f162s8c,f162s8a,f162s8z,f162u8,f162u8r,f162u8f,f162u8c,f162u8a,f162u8z,u82f16,s82f16,s162f16,s162f16r,s162f16f,s162f16c,s162f16a,s162f16z,s162f32,s162s8,s162u8,s322f32,s322f32r,s322f32f,s322f32c,s322f32a,s322f32z,s322f16,s322s64,s322s16,s642s32,s642f32r,s642f32f,s642f32c,s642f32a,s642f32z,f322bf16r,f322bf16f,f322bf16c,f322bf16a,f322bf16z,bf162f32,bf162s32r,bf162s32f,bf162s32c,bf162s32a,bf162s32z | ||
| 231 | +25=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8 | ||
| 232 | +26=Intrinsic_vor|int16,uint16 | ||
| 233 | +27=Intrinsic_vand|int16,uint16 | ||
| 234 | +28=Intrinsic_vaxpy|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 235 | +29=Intrinsic_vnot|int16,uint16 | ||
| 236 | +30=Intrinsic_vsqrt|float16,float32 | ||
| 237 | +31=Intrinsic_vrelu|float16,float32,int32 | ||
| 238 | +32=Intrinsic_vmla|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 239 | +33=Intrinsic_vmadd|float16,float32 | ||
| 240 | +42=Intrinsic_vsel|float16,float32 | ||
| 241 | +43=Intrinsic_vcmp|float16,float32 | ||
| 242 | +45=Intrinsic_vcmpv_ne|float16,float32 | ||
| 243 | +46=Intrinsic_vcmpv_eq|float16,float32,int32 | ||
| 244 | +47=Intrinsic_vcmpv_gt|float16,float32 | ||
| 245 | +48=Intrinsic_vcmpv_ge|float16,float32 | ||
| 246 | +49=Intrinsic_vcmpv_lt|float16,float32 | ||
| 247 | +50=Intrinsic_vcmpv_le|float16,float32 | ||
| 248 | +59=Intrinsic_sqrt|int64,float32 | ||
| 249 | +60=Intrinsic_abs|int64,float32 | ||
| 250 | +61=Intrinsic_bcnt0|uint64 | ||
| 251 | +62=Intrinsic_bcnt1|uint64 | ||
| 252 | +63=Intrinsic_clz|uint64 | ||
| 253 | +64=Intrinsic_max|int64,float32 | ||
| 254 | +65=Intrinsic_min|int64,float32 | ||
| 255 | +67=Intrinsic_vtranspose|uint16,int16,float16 | ||
| 256 | +71=Intrinsic_vlrelu|float16,float32 | ||
| 257 | +73=Intrinsic_vbitsort|float16 | ||
| 258 | +76=Intrinsic_vmrgsort4|float16 | ||
| 259 | +104=Intrinsic_vnchwconv|int16,uint16,int8,uint8,float16,int32,uint32,float32 | ||
| 260 | +105=Intrinsic_vcopy|int16,uint16,float16,float32,int32,uint32 | ||
| 261 | +108=Intrinsic_vcmpvs_ne|float16,float32 | ||
| 262 | +109=Intrinsic_vcmpvs_eq|float16,float32,int32 | ||
| 263 | +110=Intrinsic_vcmpvs_gt|float16,float32 | ||
| 264 | +111=Intrinsic_vcmpvs_ge|float16,float32 | ||
| 265 | +112=Intrinsic_vcmpvs_lt|float16,float32 | ||
| 266 | +113=Intrinsic_vcmpvs_le|float16,float32 | ||
| 267 | +114=Intrinsic_vmaxs|float16,float32,int32,int16 | ||
| 268 | +115=Intrinsic_vmins|float16,float32,int32,int16 | ||
| 269 | +116=Intrinsic_vmaddrelu|float16,float32 | ||
| 270 | +117=Intrinsic_vgather|int16,uint16,float16,float32,int32,uint32 | ||
| 271 | +118=Intrinsic_vmulconv|u8f16f16,s8f16f16 | ||
| 272 | +121=Intrinsic_vshr|uint16,int16,uint32,int32 | ||
| 273 | +122=Intrinsic_vgatherb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 274 | +123=Intrinsic_vbrcb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 275 | +124=Intrinsic_vbi|float16,float32 | ||
| 276 | +125=Intrinsic_data_move_pad|uint8,int8,uint16,int16,float16,int32,float32,uint32,bfloat16 | ||
| 277 | +126=Intrinsic_vreduce|int16,uint16,float16,float32,int32,uint32 | ||
| 278 | +127=Intrinsic_vreducev2|int16,uint16,float16,float32,int32,uint32 | ||
| 279 | +128=Intrinsic_vbitsort32|float16,float32 | ||
| 280 | +129=Intrinsic_vmrgsort4v2|float16,float32 | ||
| 281 | +130=Intrinsic_vshl|int16,uint16,int32,uint32 | ||
| 282 | +131=Intrinsic_fix_pipe_l0c2out|f32,s32,f16 | ||
| 283 | +132=Intrinsic_vaddrelu|int16,float16,float32 | ||
| @@ -0,0 +1,283 @@ | |||
| 1 | +# [Platform Info configuration begin] | ||
| 2 | +#************************************************************************************** | ||
| 3 | +# | ||
| 4 | +[version] | ||
| 5 | +SoC_version=Ascend910B4 | ||
| 6 | +Short_SoC_version=Ascend910B | ||
| 7 | +AIC_version=AIC-C-220 | ||
| 8 | +CCEC_AIC_version=dav-c220-cube | ||
| 9 | +CCEC_AIV_version=dav-c220-vec | ||
| 10 | +CCEC_CUBE_version=dav-c220-cube | ||
| 11 | +CCEC_VECTOR_version=dav-c220-vec | ||
| 12 | +Compiler_aicpu_support_os=true | ||
| 13 | +Arch_type=4 | ||
| 14 | +NpuArch=2201 | ||
| 15 | +Chip_type=5 | ||
| 16 | + | ||
| 17 | +[SoCInfo] | ||
| 18 | +ai_core_cnt=20 | ||
| 19 | +cube_core_cnt=20 | ||
| 20 | +vector_core_cnt=40 | ||
| 21 | +ai_cpu_cnt=6 | ||
| 22 | +memory_type= | ||
| 23 | +memory_size=34359738368 | ||
| 24 | +l2_type=0 | ||
| 25 | +l2_size=100663296 | ||
| 26 | +l2PageNum=64 | ||
| 27 | +normal_stream_num=32768 | ||
| 28 | +normal_stream_depth=2048 | ||
| 29 | +huge_stream_num=0 | ||
| 30 | +huge_stream_depth=0 | ||
| 31 | +prefetch_num=8 | ||
| 32 | +ffts_mode=ffts-plus | ||
| 33 | +core_type_list=CubeCore,VectorCore | ||
| 34 | +cube_vector_combine=split | ||
| 35 | +hardware_sync_betweencore=1 | ||
| 36 | +vir_type_list=4,5,10,20 | ||
| 37 | +support_bf16=1 | ||
| 38 | +support_inf_nan=1 | ||
| 39 | + | ||
| 40 | +[AICoreSpec] | ||
| 41 | +cube_freq=1500 | ||
| 42 | +cube_m_size=16 | ||
| 43 | +cube_n_size=16 | ||
| 44 | +cube_k_size=16 | ||
| 45 | +vec_calc_size=128 | ||
| 46 | +l0_a_size=65536 | ||
| 47 | +l0_b_size=65536 | ||
| 48 | +l0_c_size=131072 | ||
| 49 | +l1_size=524288 | ||
| 50 | +fb0_size=2048 | ||
| 51 | +fb1_size=1024 | ||
| 52 | +fb2_size=2048 | ||
| 53 | +fb3_size=2048 | ||
| 54 | +bt_size=1024 | ||
| 55 | +smask_buffer=0 | ||
| 56 | +ub_size=196608 | ||
| 57 | +ubblock_size=32 | ||
| 58 | +ubbank_size=4096 | ||
| 59 | +ubbank_num=64 | ||
| 60 | +ubburst_in_one_block=32 | ||
| 61 | +ubbank_group_num=16 | ||
| 62 | +unzip_engines=4 | ||
| 63 | +unzip_max_ratios=64 | ||
| 64 | +unzip_channels=2 | ||
| 65 | +unzip_is_tight=1 | ||
| 66 | +support_fixpipe=1 | ||
| 67 | +sparsity=1 | ||
| 68 | +padding_size=32 | ||
| 69 | + | ||
| 70 | +[AICoreMemoryRates] | ||
| 71 | +ddr_rate=32 | ||
| 72 | +ddr_read_rate=32 | ||
| 73 | +ddr_write_rate=32 | ||
| 74 | +l2_rate=110 | ||
| 75 | +l2_read_rate=110 | ||
| 76 | +l2_write_rate=86 | ||
| 77 | +l1_to_l0_a_rate=512 | ||
| 78 | +l1_to_l0_b_rate=256 | ||
| 79 | +l1_to_ub_rate=128 | ||
| 80 | +l0_c_to_ub_rate=256 | ||
| 81 | +ub_to_l2_rate=64 | ||
| 82 | +ub_to_ddr_rate=64 | ||
| 83 | +ub_to_l1_rate=128 | ||
| 84 | + | ||
| 85 | +[DtypeMKN] | ||
| 86 | +Default=16,16,16 | ||
| 87 | +DT_INT8=16,32,16 | ||
| 88 | +DT_UINT8=16,32,16 | ||
| 89 | +DT_INT4=16,64,16 | ||
| 90 | +DT_INT2=16,128,16 | ||
| 91 | +DT_UINT2=16,128,16 | ||
| 92 | +DT_UINT1=16,256,16 | ||
| 93 | + | ||
| 94 | +[CPUCache] | ||
| 95 | +AICPUSyncBySW=0 | ||
| 96 | +TSCPUSyncBySW=0 | ||
| 97 | + | ||
| 98 | +[DSARandom] | ||
| 99 | +CounterWorkspaceSize=48 | ||
| 100 | + | ||
| 101 | +[AICoreintrinsicDtypeMap] | ||
| 102 | +0=Intrinsic_vrec|float16,float32 | ||
| 103 | +1=Intrinsic_vadd|float16,float32,int32,int16 | ||
| 104 | +2=Intrinsic_vadds|float16,float32,int32,int16 | ||
| 105 | +3=Intrinsic_vsub|float16,float32,int32,int16 | ||
| 106 | +4=Intrinsic_vdiv|float16,float32 | ||
| 107 | +5=Intrinsic_vrsqrt|float16,float32 | ||
| 108 | +6=Intrinsic_vmul|float16,float32,int32,int16 | ||
| 109 | +7=Intrinsic_vmax|float16,float32,int32,int16 | ||
| 110 | +9=Intrinsic_vmin|float16,float32,int32,int16 | ||
| 111 | +10=Intrinsic_vln|float16,float32 | ||
| 112 | +11=Intrinsic_vexp|float16,float32 | ||
| 113 | +12=Intrinsic_vmuls|float16,float32,int32,int16 | ||
| 114 | +13=Intrinsic_vabs|float16,float32 | ||
| 115 | +14=Intrinsic_vcmax|float16,float32 | ||
| 116 | +15=Intrinsic_vcgmax|float16,float32 | ||
| 117 | +16=Intrinsic_vcmin|float16,float32 | ||
| 118 | +17=Intrinsic_vcgmin|float16,float32 | ||
| 119 | +18=Intrinsic_vcadd|float16,float32 | ||
| 120 | +19=Intrinsic_vcgadd|float16,float32 | ||
| 121 | +20=Intrinsic_vcpadd|float16,float32 | ||
| 122 | +24=Intrinsic_vconv|f322f32r,f322f32f,f322f32c,deq,f322f32a,f322f32z,f322f16,f322f16r,f322f16f,f322f16c,f322f16a,f322f16z,f322f16o,f322s64r,f322s64f,f322s64c,f322s64a,f322s64z,f322s32r,f322s32f,f322s32c,f322s32a,f322s32z,f322s16r,f322s16f,f322s16c,f322s16a,f322s16z,f162f32,f162s32r,f162s32f,f162s32c,f162s32a,f162s32z,f162s16r,f162s16f,f162s16c,f162s16a,f162s16z,f162s8,f162s8r,f162s8f,f162s8c,f162s8a,f162s8z,f162u8,f162u8r,f162u8f,f162u8c,f162u8a,f162u8z,u82f16,s82f16,s162f16,s162f16r,s162f16f,s162f16c,s162f16a,s162f16z,s162f32,s162s8,s162u8,s322f32,s322f32r,s322f32f,s322f32c,s322f32a,s322f32z,s322f16,s322s64,s322s16,s642s32,s642f32r,s642f32f,s642f32c,s642f32a,s642f32z,f322bf16r,f322bf16f,f322bf16c,f322bf16a,f322bf16z,bf162f32,bf162s32r,bf162s32f,bf162s32c,bf162s32a,bf162s32z | ||
| 123 | +25=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8,h322f32,f32f32f32,f322f32 | ||
| 124 | +26=Intrinsic_vor|int16,uint16 | ||
| 125 | +27=Intrinsic_vand|int16,uint16 | ||
| 126 | +28=Intrinsic_vaxpy|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 127 | +29=Intrinsic_vnot|int16,uint16 | ||
| 128 | +30=Intrinsic_vsqrt|float16,float32 | ||
| 129 | +31=Intrinsic_vrelu|float16,float32,int32 | ||
| 130 | +32=Intrinsic_vmla|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 131 | +33=Intrinsic_vmadd|float16,float32 | ||
| 132 | +34=Intrinsic_vmaddrelu|float16,float32 | ||
| 133 | +42=Intrinsic_vsel|float16,float32 | ||
| 134 | +43=Intrinsic_vcmp|float16,float32,int16 | ||
| 135 | +45=Intrinsic_vcmpv_ne|float16,float32 | ||
| 136 | +46=Intrinsic_vcmpv_eq|float16,float32,int32 | ||
| 137 | +47=Intrinsic_vcmpv_gt|float16,float32 | ||
| 138 | +48=Intrinsic_vcmpv_ge|float16,float32 | ||
| 139 | +49=Intrinsic_vcmpv_lt|float16,float32 | ||
| 140 | +50=Intrinsic_vcmpv_le|float16,float32 | ||
| 141 | +59=Intrinsic_sqrt|int64,float32 | ||
| 142 | +60=Intrinsic_abs|int64,float32 | ||
| 143 | +61=Intrinsic_bcnt0|uint64 | ||
| 144 | +62=Intrinsic_bcnt1|uint64 | ||
| 145 | +63=Intrinsic_clz|uint64 | ||
| 146 | +64=Intrinsic_max|int64,float32 | ||
| 147 | +65=Intrinsic_min|int64,float32 | ||
| 148 | +67=Intrinsic_vtranspose|uint16,int16,float16 | ||
| 149 | +71=Intrinsic_vlrelu|float16,float32 | ||
| 150 | +73=Intrinsic_vbitsort|float16 | ||
| 151 | +76=Intrinsic_vmrgsort4|float16 | ||
| 152 | +79=Intrinsic_vmulconv|u8f16f16,s8f16f16 | ||
| 153 | +104=Intrinsic_vnchwconv|int16,uint16,int8,uint8,float16,int32,uint32,float32 | ||
| 154 | +108=Intrinsic_vcmpvs_ne|float16,float32 | ||
| 155 | +109=Intrinsic_vcmpvs_eq|float16,float32,int32 | ||
| 156 | +110=Intrinsic_vcmpvs_gt|float16,float32 | ||
| 157 | +111=Intrinsic_vcmpvs_ge|float16,float32 | ||
| 158 | +112=Intrinsic_vcmpvs_lt|float16,float32 | ||
| 159 | +113=Intrinsic_vcmpvs_le|float16,float32 | ||
| 160 | +114=Intrinsic_vmaxs|float16,float32,int32,int16 | ||
| 161 | +115=Intrinsic_vmins|float16,float32,int32,int16 | ||
| 162 | +116=Intrinsic_vmaddrelu|float16,float32 | ||
| 163 | +117=Intrinsic_vgather|int16,uint16,float16,float32,int32,uint32 | ||
| 164 | +118=Intrinsic_vreduce|int16,uint16,float16,float32,int32,uint32 | ||
| 165 | +119=Intrinsic_vshr|uint16,int16,uint32,int32 | ||
| 166 | +120=Intrinsic_vgatherb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 167 | +121=Intrinsic_vbrcb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 168 | +122=Intrinsic_vbi|float16,float32 | ||
| 169 | +123=Intrinsic_data_move_pad|uint8,int8,uint16,int16,float16,int32,float32,uint32,bfloat16 | ||
| 170 | +124=Intrinsic_vreducev2|int16,uint16,float16,float32,int32,uint32 | ||
| 171 | +125=Intrinsic_vbitsort32|float16,float32 | ||
| 172 | +126=Intrinsic_vmrgsort4v2|float16,float32 | ||
| 173 | +127=Intrinsic_vshl|int16,uint16,int32,uint32 | ||
| 174 | +128=Intrinsic_vcopy|int16,uint16,float16,float32,int32,uint32 | ||
| 175 | +129=Intrinsic_data_move_out2l1|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 176 | +130=Intrinsic_data_move_out2l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 177 | +131=Intrinsic_data_move_out2l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 178 | +132=Intrinsic_data_move_l12l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 179 | +133=Intrinsic_data_move_l12l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 180 | +134=Intrinsic_data_move_l12out|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 181 | +135=Intrinsic_data_move_l12bt|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 182 | +136=Intrinsic_data_move_transpose_l12l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 183 | +137=Intrinsic_data_move_transpose_l12l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 184 | +138=Intrinsic_set_l1|f16,u16,s16,f32,s32,u32 | ||
| 185 | +139=Intrinsic_set_l0a|f16,u16,s16,f32,s32,u32 | ||
| 186 | +140=Intrinsic_set_l0b|f16,u16,s16,f32,s32,u32 | ||
| 187 | +141=Intrinsic_fix_pipe_l0c2l1|f32,s32,f16 | ||
| 188 | +142=Intrinsic_fix_pipe_l0c2out|f32,s32,f16 | ||
| 189 | +143=Intrinsic_fix_pipe_l12fb|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 190 | +144=Intrinsic_fix_pipe_support_multiple_output|true | ||
| 191 | +145=Intrinsic_fix_pipe_unit_list|pre_conv,pre_act,post_transform | ||
| 192 | +146=Intrinsic_fix_pipe_pre_conv_func_list|requant,dequant,quant,cast | ||
| 193 | +147=Intrinsic_fix_pipe_pre_conv_requant|s322s8,s322u8,s322s4 | ||
| 194 | +148=Intrinsic_fix_pipe_pre_conv_dequant|s322f16 | ||
| 195 | +149=Intrinsic_fix_pipe_pre_conv_quant|f322s8,f322u8,f322s4 | ||
| 196 | +150=Intrinsic_fix_pipe_pre_conv_cast|f322f16,f322bf16 | ||
| 197 | +151=Intrinsic_fix_pipe_pre_act_func_list|normal_relu,scalar_relu,vector_relu | ||
| 198 | +152=Intrinsic_fix_pipe_pre_act_normal_relu|f32,f16,bf16,s8,u8,s4,s32 | ||
| 199 | +153=Intrinsic_fix_pipe_pre_act_scalar_relu|f16,s8,u8,s4 | ||
| 200 | +154=Intrinsic_fix_pipe_pre_act_vector_relu|f16,s8,u8,s4 | ||
| 201 | +155=Intrinsic_fix_pipe_post_transform_func_list|nz2nd | ||
| 202 | +156=Intrinsic_fix_pipe_post_transform_nz2nd|f32,f16,bf16,s8,u8,s4,s32 | ||
| 203 | +157=Intrinsic_data_move_out2l1_nd2nz|u8,s8,f16,bf16,u16,s16,f32,s32,u32 | ||
| 204 | +158=Intrinsic_vaddrelu|int16,float16,float32 | ||
| 205 | + | ||
| 206 | +[CUBECoreintrinsicDtypeMap] | ||
| 207 | +0=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8 | ||
| 208 | + | ||
| 209 | +[VectorCoreintrinsicDtypeMap] | ||
| 210 | +0=Intrinsic_vrec|float16,float32 | ||
| 211 | +1=Intrinsic_vadd|float16,float32,int32,int16 | ||
| 212 | +2=Intrinsic_vadds|float16,float32,int32,int16 | ||
| 213 | +3=Intrinsic_vsub|float16,float32,int32,int16 | ||
| 214 | +4=Intrinsic_vdiv|float16,float32 | ||
| 215 | +5=Intrinsic_vrsqrt|float16,float32 | ||
| 216 | +6=Intrinsic_vmul|float16,float32,int32,int16 | ||
| 217 | +7=Intrinsic_vmax|float16,float32,int32,int16 | ||
| 218 | +9=Intrinsic_vmin|float16,float32,int32,int16 | ||
| 219 | +10=Intrinsic_vln|float16,float32 | ||
| 220 | +11=Intrinsic_vexp|float16,float32 | ||
| 221 | +12=Intrinsic_vmuls|float16,float32,int32,int16 | ||
| 222 | +13=Intrinsic_vabs|float16,float32 | ||
| 223 | +14=Intrinsic_vcmax|float16,float32 | ||
| 224 | +15=Intrinsic_vcgmax|float16,float32 | ||
| 225 | +16=Intrinsic_vcmin|float16,float32 | ||
| 226 | +17=Intrinsic_vcgmin|float16,float32 | ||
| 227 | +18=Intrinsic_vcadd|float16,float32 | ||
| 228 | +19=Intrinsic_vcgadd|float16,float32 | ||
| 229 | +20=Intrinsic_vcpadd|float16,float32 | ||
| 230 | +24=Intrinsic_vconv|f322f32r,f322f32f,f322f32c,deq,f322f32a,f322f32z,f322f16,f322f16r,f322f16f,f322f16c,f322f16a,f322f16z,f322f16o,f322s64r,f322s64f,f322s64c,f322s64a,f322s64z,f322s32r,f322s32f,f322s32c,f322s32a,f322s32z,f322s16r,f322s16f,f322s16c,f322s16a,f322s16z,f162f32,f162s32r,f162s32f,f162s32c,f162s32a,f162s32z,f162s16r,f162s16f,f162s16c,f162s16a,f162s16z,f162s8,f162s8r,f162s8f,f162s8c,f162s8a,f162s8z,f162u8,f162u8r,f162u8f,f162u8c,f162u8a,f162u8z,u82f16,s82f16,s162f16,s162f16r,s162f16f,s162f16c,s162f16a,s162f16z,s162f32,s162s8,s162u8,s322f32,s322f32r,s322f32f,s322f32c,s322f32a,s322f32z,s322f16,s322s64,s322s16,s642s32,s642f32r,s642f32f,s642f32c,s642f32a,s642f32z,f322bf16r,f322bf16f,f322bf16c,f322bf16a,f322bf16z,bf162f32,bf162s32r,bf162s32f,bf162s32c,bf162s32a,bf162s32z | ||
| 231 | +25=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8 | ||
| 232 | +26=Intrinsic_vor|int16,uint16 | ||
| 233 | +27=Intrinsic_vand|int16,uint16 | ||
| 234 | +28=Intrinsic_vaxpy|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 235 | +29=Intrinsic_vnot|int16,uint16 | ||
| 236 | +30=Intrinsic_vsqrt|float16,float32 | ||
| 237 | +31=Intrinsic_vrelu|float16,float32,int32 | ||
| 238 | +32=Intrinsic_vmla|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 239 | +33=Intrinsic_vmadd|float16,float32 | ||
| 240 | +42=Intrinsic_vsel|float16,float32 | ||
| 241 | +43=Intrinsic_vcmp|float16,float32 | ||
| 242 | +45=Intrinsic_vcmpv_ne|float16,float32 | ||
| 243 | +46=Intrinsic_vcmpv_eq|float16,float32,int32 | ||
| 244 | +47=Intrinsic_vcmpv_gt|float16,float32 | ||
| 245 | +48=Intrinsic_vcmpv_ge|float16,float32 | ||
| 246 | +49=Intrinsic_vcmpv_lt|float16,float32 | ||
| 247 | +50=Intrinsic_vcmpv_le|float16,float32 | ||
| 248 | +59=Intrinsic_sqrt|int64,float32 | ||
| 249 | +60=Intrinsic_abs|int64,float32 | ||
| 250 | +61=Intrinsic_bcnt0|uint64 | ||
| 251 | +62=Intrinsic_bcnt1|uint64 | ||
| 252 | +63=Intrinsic_clz|uint64 | ||
| 253 | +64=Intrinsic_max|int64,float32 | ||
| 254 | +65=Intrinsic_min|int64,float32 | ||
| 255 | +67=Intrinsic_vtranspose|uint16,int16,float16 | ||
| 256 | +71=Intrinsic_vlrelu|float16,float32 | ||
| 257 | +73=Intrinsic_vbitsort|float16 | ||
| 258 | +76=Intrinsic_vmrgsort4|float16 | ||
| 259 | +104=Intrinsic_vnchwconv|int16,uint16,int8,uint8,float16,int32,uint32,float32 | ||
| 260 | +105=Intrinsic_vcopy|int16,uint16,float16,float32,int32,uint32 | ||
| 261 | +108=Intrinsic_vcmpvs_ne|float16,float32 | ||
| 262 | +109=Intrinsic_vcmpvs_eq|float16,float32,int32 | ||
| 263 | +110=Intrinsic_vcmpvs_gt|float16,float32 | ||
| 264 | +111=Intrinsic_vcmpvs_ge|float16,float32 | ||
| 265 | +112=Intrinsic_vcmpvs_lt|float16,float32 | ||
| 266 | +113=Intrinsic_vcmpvs_le|float16,float32 | ||
| 267 | +114=Intrinsic_vmaxs|float16,float32,int32,int16 | ||
| 268 | +115=Intrinsic_vmins|float16,float32,int32,int16 | ||
| 269 | +116=Intrinsic_vmaddrelu|float16,float32 | ||
| 270 | +117=Intrinsic_vgather|int16,uint16,float16,float32,int32,uint32 | ||
| 271 | +118=Intrinsic_vmulconv|u8f16f16,s8f16f16 | ||
| 272 | +121=Intrinsic_vshr|uint16,int16,uint32,int32 | ||
| 273 | +122=Intrinsic_vgatherb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 274 | +123=Intrinsic_vbrcb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 275 | +124=Intrinsic_vbi|float16,float32 | ||
| 276 | +125=Intrinsic_data_move_pad|uint8,int8,uint16,int16,float16,int32,float32,uint32,bfloat16 | ||
| 277 | +126=Intrinsic_vreduce|int16,uint16,float16,float32,int32,uint32 | ||
| 278 | +127=Intrinsic_vreducev2|int16,uint16,float16,float32,int32,uint32 | ||
| 279 | +128=Intrinsic_vbitsort32|float16,float32 | ||
| 280 | +129=Intrinsic_vmrgsort4v2|float16,float32 | ||
| 281 | +130=Intrinsic_vshl|int16,uint16,int32,uint32 | ||
| 282 | +131=Intrinsic_fix_pipe_l0c2out|f32,s32,f16 | ||
| 283 | +132=Intrinsic_vaddrelu|int16,float16,float32 | ||
| @@ -0,0 +1,282 @@ | |||
| 1 | +# [Platform Info configuration begin] | ||
| 2 | +#************************************************************************************** | ||
| 3 | +# | ||
| 4 | +[version] | ||
| 5 | +SoC_version=Ascend910_9363 | ||
| 6 | +Short_SoC_version=Ascend910_93 | ||
| 7 | +AIC_version=AIC-C-220 | ||
| 8 | +CCEC_AIC_version=dav-c220-cube | ||
| 9 | +CCEC_AIV_version=dav-c220-vec | ||
| 10 | +CCEC_CUBE_version=dav-c220-cube | ||
| 11 | +CCEC_VECTOR_version=dav-c220-vec | ||
| 12 | +Compiler_aicpu_support_os=true | ||
| 13 | +Arch_type=4 | ||
| 14 | +NpuArch=2201 | ||
| 15 | +Chip_type=5 | ||
| 16 | + | ||
| 17 | +[SoCInfo] | ||
| 18 | +ai_core_cnt=20 | ||
| 19 | +cube_core_cnt=20 | ||
| 20 | +vector_core_cnt=40 | ||
| 21 | +ai_cpu_cnt=6 | ||
| 22 | +memory_type= | ||
| 23 | +memory_size=34359738368 | ||
| 24 | +l2_type=0 | ||
| 25 | +l2_size=176160768 | ||
| 26 | +l2PageNum=64 | ||
| 27 | +normal_stream_num=32768 | ||
| 28 | +normal_stream_depth=2048 | ||
| 29 | +huge_stream_num=0 | ||
| 30 | +huge_stream_depth=0 | ||
| 31 | +ffts_mode=ffts-plus | ||
| 32 | +core_type_list=CubeCore,VectorCore | ||
| 33 | +cube_vector_combine=split | ||
| 34 | +hardware_sync_betweencore=1 | ||
| 35 | +vir_type_list=4,5,10,20 | ||
| 36 | +support_bf16=1 | ||
| 37 | +support_inf_nan=1 | ||
| 38 | + | ||
| 39 | +[AICoreSpec] | ||
| 40 | +cube_freq=1500 | ||
| 41 | +cube_m_size=16 | ||
| 42 | +cube_n_size=16 | ||
| 43 | +cube_k_size=16 | ||
| 44 | +vec_calc_size=128 | ||
| 45 | +l0_a_size=65536 | ||
| 46 | +l0_b_size=65536 | ||
| 47 | +l0_c_size=131072 | ||
| 48 | +l1_size=524288 | ||
| 49 | +fb0_size=2048 | ||
| 50 | +fb1_size=1024 | ||
| 51 | +fb2_size=2048 | ||
| 52 | +fb3_size=2048 | ||
| 53 | +bt_size=1024 | ||
| 54 | +smask_buffer=0 | ||
| 55 | +ub_size=196608 | ||
| 56 | +ubblock_size=32 | ||
| 57 | +ubbank_size=4096 | ||
| 58 | +ubbank_num=64 | ||
| 59 | +ubburst_in_one_block=32 | ||
| 60 | +ubbank_group_num=16 | ||
| 61 | +unzip_engines=4 | ||
| 62 | +unzip_max_ratios=64 | ||
| 63 | +unzip_channels=2 | ||
| 64 | +unzip_is_tight=1 | ||
| 65 | +support_fixpipe=1 | ||
| 66 | +sparsity=1 | ||
| 67 | +padding_size=32 | ||
| 68 | + | ||
| 69 | +[AICoreMemoryRates] | ||
| 70 | +ddr_rate=32 | ||
| 71 | +ddr_read_rate=32 | ||
| 72 | +ddr_write_rate=32 | ||
| 73 | +l2_rate=110 | ||
| 74 | +l2_read_rate=110 | ||
| 75 | +l2_write_rate=86 | ||
| 76 | +l1_to_l0_a_rate=512 | ||
| 77 | +l1_to_l0_b_rate=256 | ||
| 78 | +l1_to_ub_rate=128 | ||
| 79 | +l0_c_to_ub_rate=256 | ||
| 80 | +ub_to_l2_rate=64 | ||
| 81 | +ub_to_ddr_rate=64 | ||
| 82 | +ub_to_l1_rate=128 | ||
| 83 | + | ||
| 84 | +[DtypeMKN] | ||
| 85 | +Default=16,16,16 | ||
| 86 | +DT_INT8=16,32,16 | ||
| 87 | +DT_UINT8=16,32,16 | ||
| 88 | +DT_INT4=16,64,16 | ||
| 89 | +DT_INT2=16,128,16 | ||
| 90 | +DT_UINT2=16,128,16 | ||
| 91 | +DT_UINT1=16,256,16 | ||
| 92 | + | ||
| 93 | +[CPUCache] | ||
| 94 | +AICPUSyncBySW=0 | ||
| 95 | +TSCPUSyncBySW=0 | ||
| 96 | + | ||
| 97 | +[DSARandom] | ||
| 98 | +CounterWorkspaceSize=48 | ||
| 99 | + | ||
| 100 | +[AICoreintrinsicDtypeMap] | ||
| 101 | +0=Intrinsic_vrec|float16,float32 | ||
| 102 | +1=Intrinsic_vadd|float16,float32,int32,int16 | ||
| 103 | +2=Intrinsic_vadds|float16,float32,int32,int16 | ||
| 104 | +3=Intrinsic_vsub|float16,float32,int32,int16 | ||
| 105 | +4=Intrinsic_vdiv|float16,float32 | ||
| 106 | +5=Intrinsic_vrsqrt|float16,float32 | ||
| 107 | +6=Intrinsic_vmul|float16,float32,int32,int16 | ||
| 108 | +7=Intrinsic_vmax|float16,float32,int32,int16 | ||
| 109 | +9=Intrinsic_vmin|float16,float32,int32,int16 | ||
| 110 | +10=Intrinsic_vln|float16,float32 | ||
| 111 | +11=Intrinsic_vexp|float16,float32 | ||
| 112 | +12=Intrinsic_vmuls|float16,float32,int32,int16 | ||
| 113 | +13=Intrinsic_vabs|float16,float32 | ||
| 114 | +14=Intrinsic_vcmax|float16,float32 | ||
| 115 | +15=Intrinsic_vcgmax|float16,float32 | ||
| 116 | +16=Intrinsic_vcmin|float16,float32 | ||
| 117 | +17=Intrinsic_vcgmin|float16,float32 | ||
| 118 | +18=Intrinsic_vcadd|float16,float32 | ||
| 119 | +19=Intrinsic_vcgadd|float16,float32 | ||
| 120 | +20=Intrinsic_vcpadd|float16,float32 | ||
| 121 | +24=Intrinsic_vconv|f322f32r,f322f32f,f322f32c,deq,f322f32a,f322f32z,f322f16,f322f16r,f322f16f,f322f16c,f322f16a,f322f16z,f322f16o,f322s64r,f322s64f,f322s64c,f322s64a,f322s64z,f322s32r,f322s32f,f322s32c,f322s32a,f322s32z,f322s16r,f322s16f,f322s16c,f322s16a,f322s16z,f162f32,f162s32r,f162s32f,f162s32c,f162s32a,f162s32z,f162s16r,f162s16f,f162s16c,f162s16a,f162s16z,f162s8,f162s8r,f162s8f,f162s8c,f162s8a,f162s8z,f162u8,f162u8r,f162u8f,f162u8c,f162u8a,f162u8z,u82f16,s82f16,s162f16,s162f16r,s162f16f,s162f16c,s162f16a,s162f16z,s162f32,s162s8,s162u8,s322f32,s322f32r,s322f32f,s322f32c,s322f32a,s322f32z,s322f16,s322s64,s322s16,s642s32,s642f32r,s642f32f,s642f32c,s642f32a,s642f32z,f322bf16r,f322bf16f,f322bf16c,f322bf16a,f322bf16z,bf162f32,bf162s32r,bf162s32f,bf162s32c,bf162s32a,bf162s32z | ||
| 122 | +25=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8,h322f32,f32f32f32,f322f32 | ||
| 123 | +26=Intrinsic_vor|int16,uint16 | ||
| 124 | +27=Intrinsic_vand|int16,uint16 | ||
| 125 | +28=Intrinsic_vaxpy|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 126 | +29=Intrinsic_vnot|int16,uint16 | ||
| 127 | +30=Intrinsic_vsqrt|float16,float32 | ||
| 128 | +31=Intrinsic_vrelu|float16,float32,int32 | ||
| 129 | +32=Intrinsic_vmla|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 130 | +33=Intrinsic_vmadd|float16,float32 | ||
| 131 | +34=Intrinsic_vmaddrelu|float16,float32 | ||
| 132 | +42=Intrinsic_vsel|float16,float32 | ||
| 133 | +43=Intrinsic_vcmp|float16,float32,int16 | ||
| 134 | +45=Intrinsic_vcmpv_ne|float16,float32 | ||
| 135 | +46=Intrinsic_vcmpv_eq|float16,float32,int32 | ||
| 136 | +47=Intrinsic_vcmpv_gt|float16,float32 | ||
| 137 | +48=Intrinsic_vcmpv_ge|float16,float32 | ||
| 138 | +49=Intrinsic_vcmpv_lt|float16,float32 | ||
| 139 | +50=Intrinsic_vcmpv_le|float16,float32 | ||
| 140 | +59=Intrinsic_sqrt|int64,float32 | ||
| 141 | +60=Intrinsic_abs|int64,float32 | ||
| 142 | +61=Intrinsic_bcnt0|uint64 | ||
| 143 | +62=Intrinsic_bcnt1|uint64 | ||
| 144 | +63=Intrinsic_clz|uint64 | ||
| 145 | +64=Intrinsic_max|int64,float32 | ||
| 146 | +65=Intrinsic_min|int64,float32 | ||
| 147 | +67=Intrinsic_vtranspose|uint16,int16,float16 | ||
| 148 | +71=Intrinsic_vlrelu|float16,float32 | ||
| 149 | +73=Intrinsic_vbitsort|float16 | ||
| 150 | +76=Intrinsic_vmrgsort4|float16 | ||
| 151 | +79=Intrinsic_vmulconv|u8f16f16,s8f16f16 | ||
| 152 | +104=Intrinsic_vnchwconv|int16,uint16,int8,uint8,float16,int32,uint32,float32 | ||
| 153 | +108=Intrinsic_vcmpvs_ne|float16,float32 | ||
| 154 | +109=Intrinsic_vcmpvs_eq|float16,float32,int32 | ||
| 155 | +110=Intrinsic_vcmpvs_gt|float16,float32 | ||
| 156 | +111=Intrinsic_vcmpvs_ge|float16,float32 | ||
| 157 | +112=Intrinsic_vcmpvs_lt|float16,float32 | ||
| 158 | +113=Intrinsic_vcmpvs_le|float16,float32 | ||
| 159 | +114=Intrinsic_vmaxs|float16,float32,int32,int16 | ||
| 160 | +115=Intrinsic_vmins|float16,float32,int32,int16 | ||
| 161 | +116=Intrinsic_vmaddrelu|float16,float32 | ||
| 162 | +117=Intrinsic_vgather|int16,uint16,float16,float32,int32,uint32 | ||
| 163 | +118=Intrinsic_vreduce|int16,uint16,float16,float32,int32,uint32 | ||
| 164 | +119=Intrinsic_vshr|uint16,int16,uint32,int32 | ||
| 165 | +120=Intrinsic_vgatherb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 166 | +121=Intrinsic_vbrcb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 167 | +122=Intrinsic_vbi|float16,float32 | ||
| 168 | +123=Intrinsic_data_move_pad|uint8,int8,uint16,int16,float16,int32,float32,uint32,bfloat16 | ||
| 169 | +124=Intrinsic_vreducev2|int16,uint16,float16,float32,int32,uint32 | ||
| 170 | +125=Intrinsic_vbitsort32|float16,float32 | ||
| 171 | +126=Intrinsic_vmrgsort4v2|float16,float32 | ||
| 172 | +127=Intrinsic_vshl|int16,uint16,int32,uint32 | ||
| 173 | +128=Intrinsic_vcopy|int16,uint16,float16,float32,int32,uint32 | ||
| 174 | +129=Intrinsic_data_move_out2l1|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 175 | +130=Intrinsic_data_move_out2l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 176 | +131=Intrinsic_data_move_out2l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 177 | +132=Intrinsic_data_move_l12l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 178 | +133=Intrinsic_data_move_l12l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 179 | +134=Intrinsic_data_move_l12out|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 180 | +135=Intrinsic_data_move_l12bt|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 181 | +136=Intrinsic_data_move_transpose_l12l0a|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 182 | +137=Intrinsic_data_move_transpose_l12l0b|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 183 | +138=Intrinsic_set_l1|f16,u16,s16,f32,s32,u32 | ||
| 184 | +139=Intrinsic_set_l0a|f16,u16,s16,f32,s32,u32 | ||
| 185 | +140=Intrinsic_set_l0b|f16,u16,s16,f32,s32,u32 | ||
| 186 | +141=Intrinsic_fix_pipe_l0c2l1|f32,s32,f16 | ||
| 187 | +142=Intrinsic_fix_pipe_l0c2out|f32,s32,f16 | ||
| 188 | +143=Intrinsic_fix_pipe_l12fb|u8,s8,f16,u16,s16,f32,s32,u32 | ||
| 189 | +144=Intrinsic_fix_pipe_support_multiple_output|true | ||
| 190 | +145=Intrinsic_fix_pipe_unit_list|pre_conv,pre_act,post_transform | ||
| 191 | +146=Intrinsic_fix_pipe_pre_conv_func_list|requant,dequant,quant,cast | ||
| 192 | +147=Intrinsic_fix_pipe_pre_conv_requant|s322s8,s322u8,s322s4 | ||
| 193 | +148=Intrinsic_fix_pipe_pre_conv_dequant|s322f16 | ||
| 194 | +149=Intrinsic_fix_pipe_pre_conv_quant|f322s8,f322u8,f322s4 | ||
| 195 | +150=Intrinsic_fix_pipe_pre_conv_cast|f322f16,f322bf16 | ||
| 196 | +151=Intrinsic_fix_pipe_pre_act_func_list|normal_relu,scalar_relu,vector_relu | ||
| 197 | +152=Intrinsic_fix_pipe_pre_act_normal_relu|f32,f16,bf16,s8,u8,s4,s32 | ||
| 198 | +153=Intrinsic_fix_pipe_pre_act_scalar_relu|f16,s8,u8,s4 | ||
| 199 | +154=Intrinsic_fix_pipe_pre_act_vector_relu|f16,s8,u8,s4 | ||
| 200 | +155=Intrinsic_fix_pipe_post_transform_func_list|nz2nd | ||
| 201 | +156=Intrinsic_fix_pipe_post_transform_nz2nd|f32,f16,bf16,s8,u8,s4,s32 | ||
| 202 | +157=Intrinsic_data_move_out2l1_nd2nz|u8,s8,f16,bf16,u16,s16,f32,s32,u32 | ||
| 203 | +158=Intrinsic_vaddrelu|int16,float16,float32 | ||
| 204 | + | ||
| 205 | +[CUBECoreintrinsicDtypeMap] | ||
| 206 | +0=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8 | ||
| 207 | + | ||
| 208 | +[VectorCoreintrinsicDtypeMap] | ||
| 209 | +0=Intrinsic_vrec|float16,float32 | ||
| 210 | +1=Intrinsic_vadd|float16,float32,int32,int16 | ||
| 211 | +2=Intrinsic_vadds|float16,float32,int32,int16 | ||
| 212 | +3=Intrinsic_vsub|float16,float32,int32,int16 | ||
| 213 | +4=Intrinsic_vdiv|float16,float32 | ||
| 214 | +5=Intrinsic_vrsqrt|float16,float32 | ||
| 215 | +6=Intrinsic_vmul|float16,float32,int32,int16 | ||
| 216 | +7=Intrinsic_vmax|float16,float32,int32,int16 | ||
| 217 | +9=Intrinsic_vmin|float16,float32,int32,int16 | ||
| 218 | +10=Intrinsic_vln|float16,float32 | ||
| 219 | +11=Intrinsic_vexp|float16,float32 | ||
| 220 | +12=Intrinsic_vmuls|float16,float32,int32,int16 | ||
| 221 | +13=Intrinsic_vabs|float16,float32 | ||
| 222 | +14=Intrinsic_vcmax|float16,float32 | ||
| 223 | +15=Intrinsic_vcgmax|float16,float32 | ||
| 224 | +16=Intrinsic_vcmin|float16,float32 | ||
| 225 | +17=Intrinsic_vcgmin|float16,float32 | ||
| 226 | +18=Intrinsic_vcadd|float16,float32 | ||
| 227 | +19=Intrinsic_vcgadd|float16,float32 | ||
| 228 | +20=Intrinsic_vcpadd|float16,float32 | ||
| 229 | +24=Intrinsic_vconv|f322f32r,f322f32f,f322f32c,deq,f322f32a,f322f32z,f322f16,f322f16r,f322f16f,f322f16c,f322f16a,f322f16z,f322f16o,f322s64r,f322s64f,f322s64c,f322s64a,f322s64z,f322s32r,f322s32f,f322s32c,f322s32a,f322s32z,f322s16r,f322s16f,f322s16c,f322s16a,f322s16z,f162f32,f162s32r,f162s32f,f162s32c,f162s32a,f162s32z,f162s16r,f162s16f,f162s16c,f162s16a,f162s16z,f162s8,f162s8r,f162s8f,f162s8c,f162s8a,f162s8z,f162u8,f162u8r,f162u8f,f162u8c,f162u8a,f162u8z,u82f16,s82f16,s162f16,s162f16r,s162f16f,s162f16c,s162f16a,s162f16z,s162f32,s162s8,s162u8,s322f32,s322f32r,s322f32f,s322f32c,s322f32a,s322f32z,s322f16,s322s64,s322s16,s642s32,s642f32r,s642f32f,s642f32c,s642f32a,s642f32z,f322bf16r,f322bf16f,f322bf16c,f322bf16a,f322bf16z,bf162f32,bf162s32r,bf162s32f,bf162s32c,bf162s32a,bf162s32z | ||
| 230 | +25=Intrinsic_mmad|u32u8u8,s32s8s8,s32u8s8,f16f16f16,f32f16f16,f16f16u2,u8,s8,f162f16,f162f32,f16u2,u8s8 | ||
| 231 | +26=Intrinsic_vor|int16,uint16 | ||
| 232 | +27=Intrinsic_vand|int16,uint16 | ||
| 233 | +28=Intrinsic_vaxpy|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 234 | +29=Intrinsic_vnot|int16,uint16 | ||
| 235 | +30=Intrinsic_vsqrt|float16,float32 | ||
| 236 | +31=Intrinsic_vrelu|float16,float32,int32 | ||
| 237 | +32=Intrinsic_vmla|f16f16f16,f32f32f32,f32f16f16,float16,float32 | ||
| 238 | +33=Intrinsic_vmadd|float16,float32 | ||
| 239 | +42=Intrinsic_vsel|float16,float32 | ||
| 240 | +43=Intrinsic_vcmp|float16,float32 | ||
| 241 | +45=Intrinsic_vcmpv_ne|float16,float32 | ||
| 242 | +46=Intrinsic_vcmpv_eq|float16,float32,int32 | ||
| 243 | +47=Intrinsic_vcmpv_gt|float16,float32 | ||
| 244 | +48=Intrinsic_vcmpv_ge|float16,float32 | ||
| 245 | +49=Intrinsic_vcmpv_lt|float16,float32 | ||
| 246 | +50=Intrinsic_vcmpv_le|float16,float32 | ||
| 247 | +59=Intrinsic_sqrt|int64,float32 | ||
| 248 | +60=Intrinsic_abs|int64,float32 | ||
| 249 | +61=Intrinsic_bcnt0|uint64 | ||
| 250 | +62=Intrinsic_bcnt1|uint64 | ||
| 251 | +63=Intrinsic_clz|uint64 | ||
| 252 | +64=Intrinsic_max|int64,float32 | ||
| 253 | +65=Intrinsic_min|int64,float32 | ||
| 254 | +67=Intrinsic_vtranspose|uint16,int16,float16 | ||
| 255 | +71=Intrinsic_vlrelu|float16,float32 | ||
| 256 | +73=Intrinsic_vbitsort|float16 | ||
| 257 | +76=Intrinsic_vmrgsort4|float16 | ||
| 258 | +104=Intrinsic_vnchwconv|int16,uint16,int8,uint8,float16,int32,uint32,float32 | ||
| 259 | +105=Intrinsic_vcopy|int16,uint16,float16,float32,int32,uint32 | ||
| 260 | +108=Intrinsic_vcmpvs_ne|float16,float32 | ||
| 261 | +109=Intrinsic_vcmpvs_eq|float16,float32,int32 | ||
| 262 | +110=Intrinsic_vcmpvs_gt|float16,float32 | ||
| 263 | +111=Intrinsic_vcmpvs_ge|float16,float32 | ||
| 264 | +112=Intrinsic_vcmpvs_lt|float16,float32 | ||
| 265 | +113=Intrinsic_vcmpvs_le|float16,float32 | ||
| 266 | +114=Intrinsic_vmaxs|float16,float32,int32,int16 | ||
| 267 | +115=Intrinsic_vmins|float16,float32,int32,int16 | ||
| 268 | +116=Intrinsic_vmaddrelu|float16,float32 | ||
| 269 | +117=Intrinsic_vgather|int16,uint16,float16,float32,int32,uint32 | ||
| 270 | +118=Intrinsic_vmulconv|u8f16f16,s8f16f16 | ||
| 271 | +121=Intrinsic_vshr|uint16,int16,uint32,int32 | ||
| 272 | +122=Intrinsic_vgatherb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 273 | +123=Intrinsic_vbrcb|u16u16,s16s16,f16f16,u32u32,s32s32,f32f32 | ||
| 274 | +124=Intrinsic_vbi|float16,float32 | ||
| 275 | +125=Intrinsic_data_move_pad|uint8,int8,uint16,int16,float16,int32,float32,uint32,bfloat16 | ||
| 276 | +126=Intrinsic_vreduce|int16,uint16,float16,float32,int32,uint32 | ||
| 277 | +127=Intrinsic_vreducev2|int16,uint16,float16,float32,int32,uint32 | ||
| 278 | +128=Intrinsic_vbitsort32|float16,float32 | ||
| 279 | +129=Intrinsic_vmrgsort4v2|float16,float32 | ||
| 280 | +130=Intrinsic_vshl|int16,uint16,int32,uint32 | ||
| 281 | +131=Intrinsic_fix_pipe_l0c2out|f32,s32,f16 | ||
| 282 | +132=Intrinsic_vaddrelu|int16,float16,float32 | ||
Rframework/src/platform/parser/simulation_platform/platform_config/950DT_957x.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9572.ini+13-3
| @@ -11,19 +11,23 @@ CCEC_CUBE_version=dav-c310-cube | |||
| 11 | CCEC_VECTOR_version=dav-c310-vec | 11 | CCEC_VECTOR_version=dav-c310-vec |
| 12 | Compiler_aicpu_support_os=true | 12 | Compiler_aicpu_support_os=true |
| 13 | NpuArch=3510 | 13 | NpuArch=3510 |
| 14 | +Chip_type=15 | ||
| 15 | + | ||
| 16 | +[DieInfo] | ||
| 17 | +io_die_num=2 | ||
| 14 | 18 | ||
| 15 | [SoCInfo] | 19 | [SoCInfo] |
| 16 | ai_core_cnt=28 | 20 | ai_core_cnt=28 |
| 17 | cube_core_cnt=28 | 21 | cube_core_cnt=28 |
| 18 | vector_core_cnt=56 | 22 | vector_core_cnt=56 |
| 19 | -ai_cpu_cnt=6 | 23 | +ai_cpu_cnt=7 |
| 20 | memory_type=0 | 24 | memory_type=0 |
| 21 | memory_size=103079215104 | 25 | memory_size=103079215104 |
| 22 | l2_type=0 | 26 | l2_type=0 |
| 23 | l2_size=134217728 | 27 | l2_size=134217728 |
| 24 | l2PageNum=64 | 28 | l2PageNum=64 |
| 25 | -normal_stream_num=2048 | 29 | +normal_stream_num=65535 |
| 26 | -normal_stream_depth=2048 | 30 | +normal_stream_depth=2049 |
| 27 | huge_stream_num=0 | 31 | huge_stream_num=0 |
| 28 | huge_stream_depth=0 | 32 | huge_stream_depth=0 |
| 29 | prefetch_num=8 | 33 | prefetch_num=8 |
| @@ -63,6 +67,7 @@ l0a_layout_zN=1 | |||
| 63 | vector_reg_width=256 | 67 | vector_reg_width=256 |
| 64 | predicate_reg_width=32 | 68 | predicate_reg_width=32 |
| 65 | wide_reg_width=768 | 69 | wide_reg_width=768 |
| 70 | +padding_size=0 | ||
| 66 | 71 | ||
| 67 | [AICoreMemoryRates] | 72 | [AICoreMemoryRates] |
| 68 | ddr_rate=80 | 73 | ddr_rate=80 |
| @@ -81,6 +86,11 @@ ub_to_l1_rate=128 | |||
| 81 | 86 | ||
| 82 | [DtypeMKN] | 87 | [DtypeMKN] |
| 83 | Default=16,16,16 | 88 | Default=16,16,16 |
| 89 | +DT_FLOAT8_E4M3FN=16,32,16 | ||
| 90 | +DT_HIFLOAT8=16,32,16 | ||
| 91 | +DT_HIFLOAT4=16,64,16 | ||
| 92 | +DT_FLOAT4_E2M1=16,64,16 | ||
| 93 | +DT_FLOAT4_E1M2=16,64,16 | ||
| 84 | DT_INT8=16,32,16 | 94 | DT_INT8=16,32,16 |
| 85 | DT_UINT8=16,32,16 | 95 | DT_UINT8=16,32,16 |
| 86 | DT_INT4=16,64,16 | 96 | DT_INT4=16,64,16 |
Rframework/src/platform/parser/simulation_platform/platform_config/950DT_9581.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9581.ini+0-0
File renamed without changes.
Rframework/src/platform/parser/simulation_platform/platform_config/950DT_9581x.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9581X.ini+0-0
File renamed without changes.
Rframework/src/platform/parser/simulation_platform/platform_config/950DT_958x.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend950DT_9582.ini+19-9
| @@ -11,19 +11,23 @@ CCEC_CUBE_version=dav-c310-cube | |||
| 11 | CCEC_VECTOR_version=dav-c310-vec | 11 | CCEC_VECTOR_version=dav-c310-vec |
| 12 | Compiler_aicpu_support_os=true | 12 | Compiler_aicpu_support_os=true |
| 13 | NpuArch=3510 | 13 | NpuArch=3510 |
| 14 | +Chip_type=15 | ||
| 15 | + | ||
| 16 | +[DieInfo] | ||
| 17 | +io_die_num=2 | ||
| 14 | 18 | ||
| 15 | [SoCInfo] | 19 | [SoCInfo] |
| 16 | ai_core_cnt=32 | 20 | ai_core_cnt=32 |
| 17 | cube_core_cnt=32 | 21 | cube_core_cnt=32 |
| 18 | vector_core_cnt=64 | 22 | vector_core_cnt=64 |
| 19 | -ai_cpu_cnt=8 | 23 | +ai_cpu_cnt=6 |
| 20 | memory_type=0 | 24 | memory_type=0 |
| 21 | memory_size=103079215104 | 25 | memory_size=103079215104 |
| 22 | l2_type=0 | 26 | l2_type=0 |
| 23 | l2_size=134217728 | 27 | l2_size=134217728 |
| 24 | l2PageNum=64 | 28 | l2PageNum=64 |
| 25 | -normal_stream_num=2048 | 29 | +normal_stream_num=65535 |
| 26 | -normal_stream_depth=2048 | 30 | +normal_stream_depth=2049 |
| 27 | huge_stream_num=0 | 31 | huge_stream_num=0 |
| 28 | huge_stream_depth=0 | 32 | huge_stream_depth=0 |
| 29 | prefetch_num=8 | 33 | prefetch_num=8 |
| @@ -63,11 +67,12 @@ l0a_layout_zN=1 | |||
| 63 | vector_reg_width=256 | 67 | vector_reg_width=256 |
| 64 | predicate_reg_width=32 | 68 | predicate_reg_width=32 |
| 65 | wide_reg_width=768 | 69 | wide_reg_width=768 |
| 70 | +padding_size=0 | ||
| 66 | 71 | ||
| 67 | [AICoreMemoryRates] | 72 | [AICoreMemoryRates] |
| 68 | -ddr_rate=61 | 73 | +ddr_rate=80 |
| 69 | -ddr_read_rate=61 | 74 | +ddr_read_rate=80 |
| 70 | -ddr_write_rate=61 | 75 | +ddr_write_rate=80 |
| 71 | l2_rate=100 | 76 | l2_rate=100 |
| 72 | l2_read_rate=100 | 77 | l2_read_rate=100 |
| 73 | l2_write_rate=100 | 78 | l2_write_rate=100 |
| @@ -81,6 +86,11 @@ ub_to_l1_rate=128 | |||
| 81 | 86 | ||
| 82 | [DtypeMKN] | 87 | [DtypeMKN] |
| 83 | Default=16,16,16 | 88 | Default=16,16,16 |
| 89 | +DT_FLOAT8_E4M3FN=16,32,16 | ||
| 90 | +DT_HIFLOAT8=16,32,16 | ||
| 91 | +DT_HIFLOAT4=16,64,16 | ||
| 92 | +DT_FLOAT4_E2M1=16,64,16 | ||
| 93 | +DT_FLOAT4_E1M2=16,64,16 | ||
| 84 | DT_INT8=16,32,16 | 94 | DT_INT8=16,32,16 |
| 85 | DT_UINT8=16,32,16 | 95 | DT_UINT8=16,32,16 |
| 86 | DT_INT4=16,64,16 | 96 | DT_INT4=16,64,16 |
| @@ -221,9 +231,9 @@ predicate_reg_width=32 | |||
| 221 | wide_reg_width=768 | 231 | wide_reg_width=768 |
| 222 | 232 | ||
| 223 | [VectorCoreMemoryRates] | 233 | [VectorCoreMemoryRates] |
| 224 | -ddr_rate=31 | 234 | +ddr_rate=40 |
| 225 | -ddr_read_rate=31 | 235 | +ddr_read_rate=40 |
| 226 | -ddr_write_rate=31 | 236 | +ddr_write_rate=40 |
| 227 | l2_rate=100 | 237 | l2_rate=100 |
| 228 | l2_read_rate=100 | 238 | l2_read_rate=100 |
| 229 | l2_write_rate=100 | 239 | l2_write_rate=100 |
Rframework/src/platform/parser/simulation_platform/platform_config/950PR_957x.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend950PR_9579.ini+12-3
| @@ -11,19 +11,23 @@ CCEC_CUBE_version=dav-c310-cube | |||
| 11 | CCEC_VECTOR_version=dav-c310-vec | 11 | CCEC_VECTOR_version=dav-c310-vec |
| 12 | Compiler_aicpu_support_os=true | 12 | Compiler_aicpu_support_os=true |
| 13 | NpuArch=3510 | 13 | NpuArch=3510 |
| 14 | +Chip_type=15 | ||
| 15 | + | ||
| 16 | +[DieInfo] | ||
| 17 | +io_die_num=2 | ||
| 14 | 18 | ||
| 15 | [SoCInfo] | 19 | [SoCInfo] |
| 16 | ai_core_cnt=28 | 20 | ai_core_cnt=28 |
| 17 | cube_core_cnt=28 | 21 | cube_core_cnt=28 |
| 18 | vector_core_cnt=56 | 22 | vector_core_cnt=56 |
| 19 | -ai_cpu_cnt=5 | 23 | +ai_cpu_cnt=7 |
| 20 | memory_type=0 | 24 | memory_type=0 |
| 21 | memory_size=137438953472 | 25 | memory_size=137438953472 |
| 22 | l2_type=0 | 26 | l2_type=0 |
| 23 | l2_size=134217728 | 27 | l2_size=134217728 |
| 24 | l2PageNum=64 | 28 | l2PageNum=64 |
| 25 | -normal_stream_num=2048 | 29 | +normal_stream_num=65535 |
| 26 | -normal_stream_depth=2048 | 30 | +normal_stream_depth=2049 |
| 27 | huge_stream_num=0 | 31 | huge_stream_num=0 |
| 28 | huge_stream_depth=0 | 32 | huge_stream_depth=0 |
| 29 | prefetch_num=8 | 33 | prefetch_num=8 |
| @@ -63,6 +67,7 @@ l0a_layout_zN=1 | |||
| 63 | vector_reg_width=256 | 67 | vector_reg_width=256 |
| 64 | predicate_reg_width=32 | 68 | predicate_reg_width=32 |
| 65 | wide_reg_width=768 | 69 | wide_reg_width=768 |
| 70 | +padding_size=0 | ||
| 66 | 71 | ||
| 67 | [AICoreMemoryRates] | 72 | [AICoreMemoryRates] |
| 68 | ddr_rate=31 | 73 | ddr_rate=31 |
| @@ -82,6 +87,10 @@ ub_to_l1_rate=128 | |||
| 82 | [DtypeMKN] | 87 | [DtypeMKN] |
| 83 | Default=16,16,16 | 88 | Default=16,16,16 |
| 84 | DT_FLOAT8_E4M3FN=16,32,16 | 89 | DT_FLOAT8_E4M3FN=16,32,16 |
| 90 | +DT_HIFLOAT8=16,32,16 | ||
| 91 | +DT_HIFLOAT4=16,64,16 | ||
| 92 | +DT_FLOAT4_E2M1=16,64,16 | ||
| 93 | +DT_FLOAT4_E1M2=16,64,16 | ||
| 85 | DT_INT8=16,32,16 | 94 | DT_INT8=16,32,16 |
| 86 | DT_UINT8=16,32,16 | 95 | DT_UINT8=16,32,16 |
| 87 | DT_INT4=16,64,16 | 96 | DT_INT4=16,64,16 |
Rframework/src/platform/parser/simulation_platform/platform_config/950PR_958x.ini→framework/src/platform/parser/simulation_platform/platform_config/Ascend950PR_9589.ini+12-3
| @@ -11,19 +11,23 @@ CCEC_CUBE_version=dav-c310-cube | |||
| 11 | CCEC_VECTOR_version=dav-c310-vec | 11 | CCEC_VECTOR_version=dav-c310-vec |
| 12 | Compiler_aicpu_support_os=true | 12 | Compiler_aicpu_support_os=true |
| 13 | NpuArch=3510 | 13 | NpuArch=3510 |
| 14 | +Chip_type=15 | ||
| 15 | + | ||
| 16 | +[DieInfo] | ||
| 17 | +io_die_num=2 | ||
| 14 | 18 | ||
| 15 | [SoCInfo] | 19 | [SoCInfo] |
| 16 | ai_core_cnt=32 | 20 | ai_core_cnt=32 |
| 17 | cube_core_cnt=32 | 21 | cube_core_cnt=32 |
| 18 | vector_core_cnt=64 | 22 | vector_core_cnt=64 |
| 19 | -ai_cpu_cnt=8 | 23 | +ai_cpu_cnt=6 |
| 20 | memory_type=0 | 24 | memory_type=0 |
| 21 | memory_size=137438953472 | 25 | memory_size=137438953472 |
| 22 | l2_type=0 | 26 | l2_type=0 |
| 23 | l2_size=134217728 | 27 | l2_size=134217728 |
| 24 | l2PageNum=64 | 28 | l2PageNum=64 |
| 25 | -normal_stream_num=2048 | 29 | +normal_stream_num=65535 |
| 26 | -normal_stream_depth=2048 | 30 | +normal_stream_depth=2049 |
| 27 | huge_stream_num=0 | 31 | huge_stream_num=0 |
| 28 | huge_stream_depth=0 | 32 | huge_stream_depth=0 |
| 29 | prefetch_num=8 | 33 | prefetch_num=8 |
| @@ -63,6 +67,7 @@ l0a_layout_zN=1 | |||
| 63 | vector_reg_width=256 | 67 | vector_reg_width=256 |
| 64 | predicate_reg_width=32 | 68 | predicate_reg_width=32 |
| 65 | wide_reg_width=768 | 69 | wide_reg_width=768 |
| 70 | +padding_size=0 | ||
| 66 | 71 | ||
| 67 | [AICoreMemoryRates] | 72 | [AICoreMemoryRates] |
| 68 | ddr_rate=31 | 73 | ddr_rate=31 |
| @@ -82,6 +87,10 @@ ub_to_l1_rate=128 | |||
| 82 | [DtypeMKN] | 87 | [DtypeMKN] |
| 83 | Default=16,16,16 | 88 | Default=16,16,16 |
| 84 | DT_FLOAT8_E4M3FN=16,32,16 | 89 | DT_FLOAT8_E4M3FN=16,32,16 |
| 90 | +DT_HIFLOAT8=16,32,16 | ||
| 91 | +DT_HIFLOAT4=16,64,16 | ||
| 92 | +DT_FLOAT4_E2M1=16,64,16 | ||
| 93 | +DT_FLOAT4_E1M2=16,64,16 | ||
| 85 | DT_INT8=16,32,16 | 94 | DT_INT8=16,32,16 |
| 86 | DT_UINT8=16,32,16 | 95 | DT_UINT8=16,32,16 |
| 87 | DT_INT4=16,64,16 | 96 | DT_INT4=16,64,16 |
| @@ -8,6 +8,7 @@ AIC_version=AIC-L-311 | |||
| 8 | CCEC_AIC_version=dav-l311 | 8 | CCEC_AIC_version=dav-l311 |
| 9 | Compiler_aicpu_support_os=false | 9 | Compiler_aicpu_support_os=false |
| 10 | NpuArch=3113 | 10 | NpuArch=3113 |
| 11 | +Chip_type=201 | ||
| 11 | 12 | ||
| 12 | [SoCInfo] | 13 | [SoCInfo] |
| 13 | ai_core_cnt=1 | 14 | ai_core_cnt=1 |
| @@ -46,6 +47,7 @@ ubblock_size=32 | |||
| 46 | load3d_constraints=1 | 47 | load3d_constraints=1 |
| 47 | support_fixpipe=1 | 48 | support_fixpipe=1 |
| 48 | sparsity=1 | 49 | sparsity=1 |
| 50 | +padding_size=32 | ||
| 49 | 51 | ||
| 50 | [AICoreMemoryRates] | 52 | [AICoreMemoryRates] |
| 51 | 53 | ||
| @@ -8,6 +8,7 @@ AIC_version=AIC-L-300 | |||
| 8 | CCEC_AIC_version=dav-l300 | 8 | CCEC_AIC_version=dav-l300 |
| 9 | Compiler_aicpu_support_os=false | 9 | Compiler_aicpu_support_os=false |
| 10 | NpuArch=3003 | 10 | NpuArch=3003 |
| 11 | +Chip_type=200 | ||
| 11 | 12 | ||
| 12 | [SoCInfo] | 13 | [SoCInfo] |
| 13 | ai_core_cnt=1 | 14 | ai_core_cnt=1 |
| @@ -45,6 +46,7 @@ ubblock_size=32 | |||
| 45 | load3d_constraints=1 | 46 | load3d_constraints=1 |
| 46 | support_fixpipe=1 | 47 | support_fixpipe=1 |
| 47 | sparsity=1 | 48 | sparsity=1 |
| 49 | +padding_size=32 | ||
| 48 | 50 | ||
| 49 | [AICoreMemoryRates] | 51 | [AICoreMemoryRates] |
| 50 | 52 | ||
| @@ -25,34 +25,42 @@ namespace npu { | |||
| 25 | namespace tile_fwk { | 25 | namespace tile_fwk { |
| 26 | const std::string PLATFORM_INFO_RELATIVE_PATH = "/configs/"; | 26 | const std::string PLATFORM_INFO_RELATIVE_PATH = "/configs/"; |
| 27 | const std::string FWK_CONFIG_RELATIVE_PATH = "tile_fwk_config.json"; | 27 | const std::string FWK_CONFIG_RELATIVE_PATH = "tile_fwk_config.json"; |
| 28 | -const std::string DEFAULT_SOC_VERSION = "A2A3"; | 28 | +const std::string DEFAULT_SOC_VERSION = "Ascend910B2"; |
| 29 | const std::string INI_EXTENSION = ".ini"; | 29 | const std::string INI_EXTENSION = ".ini"; |
| 30 | const uint32_t PLATFORM_FAILED = 0xFFFFFFFF; | 30 | const uint32_t PLATFORM_FAILED = 0xFFFFFFFF; |
| 31 | const uint32_t PLATFORM_SUCCESS = 0; | 31 | const uint32_t PLATFORM_SUCCESS = 0; |
| 32 | 32 | ||
| 33 | namespace { | 33 | namespace { |
| 34 | -std::string DPlatformToSocVersion(DPlatform platform) | 34 | +// Deprecated device_platform formats (e.g. "ASCEND_910B2") mapped to standard soc_version, for compatibility only. |
| 35 | +// Legacy values whose names did not match the actual chip bin are normalized to the real soc_version | ||
| 36 | +// of the ini they used to load: ASCEND_950DT_9579 -> Ascend950DT_9572, ASCEND_950PR_9582 -> Ascend950PR_9589. | ||
| 37 | +const std::unordered_map<std::string, std::string> legacyDevicePlatformMap = { | ||
| 38 | + {"ASCEND_910B1", "Ascend910B1"}, | ||
| 39 | + {"ASCEND_910B2", "Ascend910B2"}, | ||
| 40 | + {"ASCEND_910B3", "Ascend910B3"}, | ||
| 41 | + {"ASCEND_910B4", "Ascend910B4"}, | ||
| 42 | + {"ASCEND_910_9363", "Ascend910_9363"}, | ||
| 43 | + {"ASCEND_950DT_9572", "Ascend950DT_9572"}, | ||
| 44 | + {"ASCEND_950DT_9579", "Ascend950DT_9572"}, | ||
| 45 | + {"ASCEND_950PR_9579", "Ascend950PR_9579"}, | ||
| 46 | + {"ASCEND_950DT_9581", "Ascend950DT_9581"}, | ||
| 47 | + {"ASCEND_950DT_9581X", "Ascend950DT_9581X"}, | ||
| 48 | + {"ASCEND_950DT_9582", "Ascend950DT_9582"}, | ||
| 49 | + {"ASCEND_950PR_9582", "Ascend950PR_9589"}, | ||
| 50 | + {"ASCEND_950PR_9589", "Ascend950PR_9589"}, | ||
| 51 | + {"KIRIN_9030", "Kirin9030"}, | ||
| 52 | + {"KIRIN_X90", "KirinX90"}, | ||
| 53 | +}; | ||
| 54 | + | ||
| 55 | +std::string NormalizeLegacyDevicePlatform(const std::string& platform) | ||
| 35 | { | 56 | { |
| 36 | - static const std::unordered_map<DPlatform, std::string> mappings = { | 57 | + auto it = legacyDevicePlatformMap.find(platform); |
| 37 | - {DPlatform::ASCEND_910B1, DEFAULT_SOC_VERSION}, | 58 | + if (it != legacyDevicePlatformMap.end()) { |
| 38 | - {DPlatform::ASCEND_910B2, DEFAULT_SOC_VERSION}, | 59 | + PLATFORM_LOGW("Deprecated device_platform format:%s, use standard soc_version:%s instead.", platform.c_str(), |
| 39 | - {DPlatform::ASCEND_910B3, DEFAULT_SOC_VERSION}, | 60 | + it->second.c_str()); |
| 40 | - {DPlatform::ASCEND_910B4, DEFAULT_SOC_VERSION}, | ||
| 41 | - {DPlatform::ASCEND_910C4, "910PR_9363"}, | ||
| 42 | - {DPlatform::ASCEND_950PR_9579, "950PR_957x"}, | ||
| 43 | - {DPlatform::ASCEND_950DT_9581, "950DT_9581"}, | ||
| 44 | - {DPlatform::ASCEND_950DT_9581X, "950DT_9581x"}, | ||
| 45 | - {DPlatform::ASCEND_950DT_9582, "950DT_958x"}, | ||
| 46 | - {DPlatform::ASCEND_950PR_9582, "950PR_958x"}, | ||
| 47 | - {DPlatform::ASCEND_950DT_9579, "950DT_957x"}, | ||
| 48 | - {DPlatform::KIRIN_9030, "Kirin9030"}, | ||
| 49 | - {DPlatform::KIRIN_X90, "KirinX90"}, | ||
| 50 | - }; | ||
| 51 | - auto it = mappings.find(platform); | ||
| 52 | - if (it != mappings.end()) { | ||
| 53 | return it->second; | 61 | return it->second; |
| 54 | } | 62 | } |
| 55 | - return DEFAULT_SOC_VERSION; | 63 | + return platform; |
| 56 | } | 64 | } |
| 57 | } // namespace | 65 | } // namespace |
| 58 | 66 | ||
| @@ -67,19 +75,24 @@ std::string SimulationPlatform::GetDevicePlatform() | |||
| 67 | nlohmann::json jsonData = nlohmann::json::parse(jsonFile); | 75 | nlohmann::json jsonData = nlohmann::json::parse(jsonFile); |
| 68 | jsonFile.close(); | 76 | jsonFile.close(); |
| 69 | 77 | ||
| 70 | - std::string platformStr; | 78 | + std::string socVersion; |
| 71 | if (jsonData.contains("global") && jsonData["global"].contains("platform") && | 79 | if (jsonData.contains("global") && jsonData["global"].contains("platform") && |
| 72 | jsonData["global"]["platform"].contains("device_platform") && | 80 | jsonData["global"]["platform"].contains("device_platform") && |
| 73 | jsonData["global"]["platform"]["device_platform"].is_string()) { | 81 | jsonData["global"]["platform"]["device_platform"].is_string()) { |
| 74 | - platformStr = jsonData["global"]["platform"]["device_platform"].get<std::string>(); | 82 | + socVersion = jsonData["global"]["platform"]["device_platform"].get<std::string>(); |
| 75 | - PLATFORM_LOGD("Key 'global.platform.device_platform' specified SoC version:%s.", platformStr.c_str()); | 83 | + PLATFORM_LOGD("Key 'global.platform.device_platform' specified soc version:%s.", socVersion.c_str()); |
| 76 | } else { | 84 | } else { |
| 77 | PLATFORM_LOGW("Key 'global.platform.device_platform' not found in %s, use default platform.", | 85 | PLATFORM_LOGW("Key 'global.platform.device_platform' not found in %s, use default platform.", |
| 78 | configPath.c_str()); | 86 | configPath.c_str()); |
| 87 | + return DEFAULT_SOC_VERSION; | ||
| 79 | } | 88 | } |
| 80 | 89 | ||
| 81 | - DPlatform platform = StringToDpaltform(platformStr); | 90 | + socVersion = NormalizeLegacyDevicePlatform(socVersion); |
| 82 | - return DPlatformToSocVersion(platform); | 91 | + if (StringToDPlatform(socVersion) == DPlatform::UNKNOWN_DEVICE) { |
| 92 | + PLATFORM_LOGW("Invalid soc version:%s, use default platform.", socVersion.c_str()); | ||
| 93 | + return DEFAULT_SOC_VERSION; | ||
| 94 | + } | ||
| 95 | + return socVersion; | ||
| 83 | } | 96 | } |
| 84 | 97 | ||
| 85 | bool SimulationPlatform::GetCostModelPlatformRealPath(const std::string& socVersion, std::string& realPath) | 98 | bool SimulationPlatform::GetCostModelPlatformRealPath(const std::string& socVersion, std::string& realPath) |
| @@ -23,7 +23,7 @@ namespace npu::tile_fwk { | |||
| 23 | const std::string version = "version"; | 23 | const std::string version = "version"; |
| 24 | const std::string socVersionInfo = "SoC_version"; | 24 | const std::string socVersionInfo = "SoC_version"; |
| 25 | const std::string npuArchInfo = "NpuArch"; | 25 | const std::string npuArchInfo = "NpuArch"; |
| 26 | -const std::string shortSocVer = "Short_SoC_version"; | 26 | +const std::string socSeriesInfo = "Short_SoC_version"; |
| 27 | const std::string socInfo = "SoCInfo"; | 27 | const std::string socInfo = "SoCInfo"; |
| 28 | const std::string cubeVectorMix = "cube_vector_mix"; | 28 | const std::string cubeVectorMix = "cube_vector_mix"; |
| 29 | const std::string aiCoreCnt = "ai_core_cnt"; | 29 | const std::string aiCoreCnt = "ai_core_cnt"; |
| @@ -263,15 +263,19 @@ void Platform::SetMemoryLimit(const PlatformParser& parser) | |||
| 263 | void Platform::LoadPlatformInfo(const PlatformParser& parser) | 263 | void Platform::LoadPlatformInfo(const PlatformParser& parser) |
| 264 | { | 264 | { |
| 265 | std::string archType; | 265 | std::string archType; |
| 266 | - std::string shortSocVersion; | 266 | + std::string socVersion; |
| 267 | + std::string socSeries; | ||
| 267 | std::string cvMix; | 268 | std::string cvMix; |
| 268 | std::unordered_map<std::string, std::string> versionInfo; | 269 | std::unordered_map<std::string, std::string> versionInfo; |
| 269 | PLATFORM_LOGD("Start load platform info."); | 270 | PLATFORM_LOGD("Start load platform info."); |
| 270 | if (parser.GetStringVal(version, npuArchInfo, archType)) { | 271 | if (parser.GetStringVal(version, npuArchInfo, archType)) { |
| 271 | GetSoc().SetNPUArch(archType); | 272 | GetSoc().SetNPUArch(archType); |
| 272 | } | 273 | } |
| 273 | - if (parser.GetStringVal(version, shortSocVer, shortSocVersion)) { | 274 | + if (parser.GetStringVal(version, socVersionInfo, socVersion)) { |
| 274 | - GetSoc().SetShortSocVersion(shortSocVersion); | 275 | + GetSoc().SetSocVersion(socVersion); |
| 276 | + } | ||
| 277 | + if (parser.GetStringVal(version, socSeriesInfo, socSeries)) { | ||
| 278 | + GetSoc().SetSocSeries(socSeries); | ||
| 275 | } | 279 | } |
| 276 | if (IsLiteNPU(GetSoc().GetNPUArch()) && | 280 | if (IsLiteNPU(GetSoc().GetNPUArch()) && |
| 277 | parser.GetStringVal(socInfo, cubeVectorMix, cvMix)) { // for litenpu ini CV mix, cloudnpu ini uses different key | 281 | parser.GetStringVal(socInfo, cubeVectorMix, cvMix)) { // for litenpu ini CV mix, cloudnpu ini uses different key |
| @@ -358,9 +362,10 @@ void Platform::ReloadMemoryPaths(const std::string& archType) | |||
| 358 | 362 | ||
| 359 | size_t GetMemoryLimitForArch(const std::string& arch, const std::string& space) | 363 | size_t GetMemoryLimitForArch(const std::string& arch, const std::string& space) |
| 360 | { | 364 | { |
| 361 | - // Arch -> platform ini. PyPTO Pro only supports A5. | 365 | + // Arch (machine-level legacy name kept as pypto_pro API) -> standard soc_version ini. |
| 366 | + // PyPTO Pro only supports A5 (NPU_ARCH 3510, Ascend950 series). | ||
| 362 | static const std::unordered_map<std::string, std::string> archToIni = { | 367 | static const std::unordered_map<std::string, std::string> archToIni = { |
| 363 | - {"a5", "950PR_957x"}, | 368 | + {"a5", "Ascend950PR_9579"}, |
| 364 | }; | 369 | }; |
| 365 | const auto iniIt = archToIni.find(arch); | 370 | const auto iniIt = archToIni.find(arch); |
| 366 | if (iniIt == archToIni.end()) { | 371 | if (iniIt == archToIni.end()) { |
| @@ -17,8 +17,6 @@ | |||
| 17 | #include "tilefwk/tilefwk.h" | 17 | #include "tilefwk/tilefwk.h" |
| 18 | #include "tilefwk/platform.h" | 18 | #include "tilefwk/platform.h" |
| 19 | #include "interface/configs/config_manager.h" | 19 | #include "interface/configs/config_manager.h" |
| 20 | -#include <fstream> | ||
| 21 | -#include <nlohmann/json.hpp> | ||
| 22 | #define private public | 20 | #define private public |
| 23 | #include "platform/parser/platform_parser.h" | 21 | #include "platform/parser/platform_parser.h" |
| 24 | #include "platform/parser/simulation_platform/simulation_platform.h" | 22 | #include "platform/parser/simulation_platform/simulation_platform.h" |
| @@ -39,65 +37,120 @@ public: | |||
| 39 | static void SetUpTestCase() {} | 37 | static void SetUpTestCase() {} |
| 40 | static void TearDownTestCase() {} | 38 | static void TearDownTestCase() {} |
| 41 | void SetUp() override {} | 39 | void SetUp() override {} |
| 42 | - void TearDown() override { CleanupTempConfig(); } | ||
| 43 | - | ||
| 44 | -private: | ||
| 45 | - void CleanupTempConfig() | ||
| 46 | - { | ||
| 47 | - std::string libPath = GetPyptoLibPath(); | ||
| 48 | - if (!libPath.empty()) { | ||
| 49 | - std::string configPath = libPath + "/tile_fwk_config.json"; | ||
| 50 | - std::remove(configPath.c_str()); | ||
| 51 | - } | ||
| 52 | - } | ||
| 53 | }; | 40 | }; |
| 54 | 41 | ||
| 55 | -// ==================== StringToDpaltform Tests ==================== | 42 | +// ==================== StringToDPlatform Tests ==================== |
| 56 | 43 | ||
| 57 | -TEST_F(TestDevicePlatformConfig, StringToDpaltformAllMappings) | 44 | +TEST_F(TestDevicePlatformConfig, StringToDPlatformAllMappings) |
| 58 | { | 45 | { |
| 59 | - EXPECT_EQ(StringToDpaltform("ASCEND_910B1"), DPlatform::ASCEND_910B1); | 46 | + EXPECT_EQ(StringToDPlatform("Ascend910B1"), DPlatform::ASCEND_910B1); |
| 60 | - EXPECT_EQ(StringToDpaltform("ASCEND_910B2"), DPlatform::ASCEND_910B2); | 47 | + EXPECT_EQ(StringToDPlatform("Ascend910B2"), DPlatform::ASCEND_910B2); |
| 61 | - EXPECT_EQ(StringToDpaltform("ASCEND_910B3"), DPlatform::ASCEND_910B3); | 48 | + EXPECT_EQ(StringToDPlatform("Ascend910B3"), DPlatform::ASCEND_910B3); |
| 62 | - EXPECT_EQ(StringToDpaltform("ASCEND_910B4"), DPlatform::ASCEND_910B4); | 49 | + EXPECT_EQ(StringToDPlatform("Ascend910B4"), DPlatform::ASCEND_910B4); |
| 63 | - EXPECT_EQ(StringToDpaltform("ASCEND_910C4"), DPlatform::ASCEND_910C4); | 50 | + EXPECT_EQ(StringToDPlatform("Ascend910_9363"), DPlatform::ASCEND_910_9363); |
| 64 | - EXPECT_EQ(StringToDpaltform("ASCEND_950PR_9579"), DPlatform::ASCEND_950PR_9579); | 51 | + EXPECT_EQ(StringToDPlatform("Ascend950DT_9572"), DPlatform::ASCEND_950DT_9572); |
| 65 | - EXPECT_EQ(StringToDpaltform("ASCEND_950DT_9581"), DPlatform::ASCEND_950DT_9581); | 52 | + EXPECT_EQ(StringToDPlatform("Ascend950PR_9579"), DPlatform::ASCEND_950PR_9579); |
| 66 | - EXPECT_EQ(StringToDpaltform("ASCEND_950DT_9581X"), DPlatform::ASCEND_950DT_9581X); | 53 | + EXPECT_EQ(StringToDPlatform("Ascend950DT_9581"), DPlatform::ASCEND_950DT_9581); |
| 67 | - EXPECT_EQ(StringToDpaltform("ASCEND_950DT_9582"), DPlatform::ASCEND_950DT_9582); | 54 | + EXPECT_EQ(StringToDPlatform("Ascend950DT_9581X"), DPlatform::ASCEND_950DT_9581X); |
| 68 | - EXPECT_EQ(StringToDpaltform("ASCEND_950PR_9582"), DPlatform::ASCEND_950PR_9582); | 55 | + EXPECT_EQ(StringToDPlatform("Ascend950DT_9582"), DPlatform::ASCEND_950DT_9582); |
| 69 | - EXPECT_EQ(StringToDpaltform("ASCEND_950DT_9579"), DPlatform::ASCEND_950DT_9579); | 56 | + EXPECT_EQ(StringToDPlatform("Ascend950PR_9589"), DPlatform::ASCEND_950PR_9589); |
| 70 | - EXPECT_EQ(StringToDpaltform("KIRIN_9030"), DPlatform::KIRIN_9030); | 57 | + EXPECT_EQ(StringToDPlatform("Kirin9030"), DPlatform::KIRIN_9030); |
| 58 | + EXPECT_EQ(StringToDPlatform("KirinX90"), DPlatform::KIRIN_X90); | ||
| 71 | } | 59 | } |
| 72 | 60 | ||
| 73 | -TEST_F(TestDevicePlatformConfig, StringToDpaltformUnknown) | 61 | +TEST_F(TestDevicePlatformConfig, StringToDPlatformUnknown) |
| 74 | { | 62 | { |
| 75 | - EXPECT_EQ(StringToDpaltform("INVALID_PLATFORM"), DPlatform::UNKNOWN_DEVICE); | 63 | + EXPECT_EQ(StringToDPlatform("INVALID_PLATFORM"), DPlatform::UNKNOWN_DEVICE); |
| 76 | - EXPECT_EQ(StringToDpaltform(""), DPlatform::UNKNOWN_DEVICE); | 64 | + EXPECT_EQ(StringToDPlatform(""), DPlatform::UNKNOWN_DEVICE); |
| 77 | - EXPECT_EQ(StringToDpaltform("ascend_910b2"), DPlatform::UNKNOWN_DEVICE); | 65 | + EXPECT_EQ(StringToDPlatform("ascend_910b2"), DPlatform::UNKNOWN_DEVICE); |
| 66 | + // ASCEND_910C4 was removed from DPlatform, it must resolve to UNKNOWN (not a default fallback). | ||
| 67 | + EXPECT_EQ(StringToDPlatform("ASCEND_910C4"), DPlatform::UNKNOWN_DEVICE); | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +TEST_F(TestDevicePlatformConfig, StringToDPlatformLegacyFormatCompat) | ||
| 71 | +{ | ||
| 72 | + EXPECT_EQ(StringToDPlatform("ASCEND_910B2"), DPlatform::ASCEND_910B2); | ||
| 73 | + EXPECT_EQ(StringToDPlatform("ASCEND_950PR_9579"), DPlatform::ASCEND_950PR_9579); | ||
| 74 | + EXPECT_EQ(StringToDPlatform("KIRIN_9030"), DPlatform::KIRIN_9030); | ||
| 75 | + EXPECT_EQ(StringToDPlatform("ASCEND_910_9363"), DPlatform::ASCEND_910_9363); | ||
| 76 | + EXPECT_EQ(StringToDPlatform("ASCEND_950DT_9581X"), DPlatform::ASCEND_950DT_9581X); | ||
| 77 | + // Legacy enum values whose names did not match the actual chip bin. | ||
| 78 | + EXPECT_EQ(StringToDPlatform("ASCEND_950DT_9579"), DPlatform::ASCEND_950DT_9572); | ||
| 79 | + EXPECT_EQ(StringToDPlatform("ASCEND_950PR_9582"), DPlatform::ASCEND_950PR_9589); | ||
| 80 | +} | ||
| 81 | + | ||
| 82 | +TEST_F(TestDevicePlatformConfig, DPlatformToNPUArchMapping) | ||
| 83 | +{ | ||
| 84 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_910B1), NPUArch::DAV_2201); | ||
| 85 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_910B2), NPUArch::DAV_2201); | ||
| 86 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_910B3), NPUArch::DAV_2201); | ||
| 87 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_910B4), NPUArch::DAV_2201); | ||
| 88 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_910_9363), NPUArch::DAV_2201); | ||
| 89 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_950DT_9572), NPUArch::DAV_3510); | ||
| 90 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_950PR_9579), NPUArch::DAV_3510); | ||
| 91 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_950DT_9581), NPUArch::DAV_3510); | ||
| 92 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_950DT_9581X), NPUArch::DAV_3510); | ||
| 93 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_950DT_9582), NPUArch::DAV_3510); | ||
| 94 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::ASCEND_950PR_9589), NPUArch::DAV_3510); | ||
| 95 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::KIRIN_9030), NPUArch::DAV_3113); | ||
| 96 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::KIRIN_X90), NPUArch::DAV_3003); | ||
| 97 | + EXPECT_EQ(DPlatformToNPUArch(DPlatform::UNKNOWN_DEVICE), NPUArch::DAV_UNKNOWN); | ||
| 78 | } | 98 | } |
| 79 | 99 | ||
| 80 | TEST_F(TestDevicePlatformConfig, ConfigGetDevicePlatformChain) | 100 | TEST_F(TestDevicePlatformConfig, ConfigGetDevicePlatformChain) |
| 81 | { | 101 | { |
| 82 | - config::SetPlatformConfig("device_platform", std::string("ASCEND_950PR_9579")); | 102 | + config::SetPlatformConfig("device_platform", std::string("Ascend950PR_9579")); |
| 83 | DPlatform platform = config::GetDevicePlatform(); | 103 | DPlatform platform = config::GetDevicePlatform(); |
| 84 | EXPECT_EQ(platform, DPlatform::ASCEND_950PR_9579); | 104 | EXPECT_EQ(platform, DPlatform::ASCEND_950PR_9579); |
| 85 | 105 | ||
| 86 | - config::SetPlatformConfig("device_platform", std::string("ASCEND_950DT_9581")); | 106 | + config::SetPlatformConfig("device_platform", std::string("Ascend950DT_9572")); |
| 107 | + platform = config::GetDevicePlatform(); | ||
| 108 | + EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9572); | ||
| 109 | + | ||
| 110 | + config::SetPlatformConfig("device_platform", std::string("Ascend950DT_9581")); | ||
| 87 | platform = config::GetDevicePlatform(); | 111 | platform = config::GetDevicePlatform(); |
| 88 | EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9581); | 112 | EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9581); |
| 89 | 113 | ||
| 90 | - config::SetPlatformConfig("device_platform", std::string("ASCEND_950DT_9581X")); | 114 | + config::SetPlatformConfig("device_platform", std::string("Ascend950DT_9581X")); |
| 91 | platform = config::GetDevicePlatform(); | 115 | platform = config::GetDevicePlatform(); |
| 92 | EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9581X); | 116 | EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9581X); |
| 93 | 117 | ||
| 118 | + config::SetPlatformConfig("device_platform", std::string("Ascend950DT_9582")); | ||
| 119 | + platform = config::GetDevicePlatform(); | ||
| 120 | + EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9582); | ||
| 121 | + | ||
| 122 | + config::SetPlatformConfig("device_platform", std::string("Ascend950PR_9589")); | ||
| 123 | + platform = config::GetDevicePlatform(); | ||
| 124 | + EXPECT_EQ(platform, DPlatform::ASCEND_950PR_9589); | ||
| 125 | + | ||
| 126 | + config::SetPlatformConfig("device_platform", std::string("Ascend910_9363")); | ||
| 127 | + platform = config::GetDevicePlatform(); | ||
| 128 | + EXPECT_EQ(platform, DPlatform::ASCEND_910_9363); | ||
| 129 | + | ||
| 130 | + config::SetPlatformConfig("device_platform", std::string("Ascend910B2")); | ||
| 131 | + platform = config::GetDevicePlatform(); | ||
| 132 | + EXPECT_EQ(platform, DPlatform::ASCEND_910B2); | ||
| 133 | + | ||
| 134 | + config::SetPlatformConfig("device_platform", std::string("Kirin9030")); | ||
| 135 | + platform = config::GetDevicePlatform(); | ||
| 136 | + EXPECT_EQ(platform, DPlatform::KIRIN_9030); | ||
| 137 | + | ||
| 138 | + // Deprecated device_platform formats resolve to the same DPlatform through the in-memory config chain. | ||
| 94 | config::SetPlatformConfig("device_platform", std::string("ASCEND_910B2")); | 139 | config::SetPlatformConfig("device_platform", std::string("ASCEND_910B2")); |
| 95 | platform = config::GetDevicePlatform(); | 140 | platform = config::GetDevicePlatform(); |
| 96 | EXPECT_EQ(platform, DPlatform::ASCEND_910B2); | 141 | EXPECT_EQ(platform, DPlatform::ASCEND_910B2); |
| 97 | 142 | ||
| 98 | - config::SetPlatformConfig("device_platform", std::string("KIRIN_9030")); | 143 | + config::SetPlatformConfig("device_platform", std::string("ASCEND_950DT_9579")); |
| 99 | platform = config::GetDevicePlatform(); | 144 | platform = config::GetDevicePlatform(); |
| 100 | - EXPECT_EQ(platform, DPlatform::KIRIN_9030); | 145 | + EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9572); |
| 146 | + | ||
| 147 | + config::SetPlatformConfig("device_platform", std::string("ASCEND_950PR_9582")); | ||
| 148 | + platform = config::GetDevicePlatform(); | ||
| 149 | + EXPECT_EQ(platform, DPlatform::ASCEND_950PR_9589); | ||
| 150 | + | ||
| 151 | + config::SetPlatformConfig("device_platform", std::string("ASCEND_950DT_9581X")); | ||
| 152 | + platform = config::GetDevicePlatform(); | ||
| 153 | + EXPECT_EQ(platform, DPlatform::ASCEND_950DT_9581X); | ||
| 101 | } | 154 | } |
| 102 | 155 | ||
| 103 | TEST_F(TestDevicePlatformConfig, ConfigGetDevicePlatformUnknown) | 156 | TEST_F(TestDevicePlatformConfig, ConfigGetDevicePlatformUnknown) |
| @@ -111,17 +164,19 @@ TEST_F(TestDevicePlatformConfig, ConfigGetDevicePlatformUnknown) | |||
| 111 | 164 | ||
| 112 | TEST_F(TestDevicePlatformConfig, GetDevicePlatformConfigFileNotFound) | 165 | TEST_F(TestDevicePlatformConfig, GetDevicePlatformConfigFileNotFound) |
| 113 | { | 166 | { |
| 167 | + // The shipped tile_fwk_config.json keeps the legacy "ASCEND_910B2" format; GetDevicePlatform() | ||
| 168 | + // normalizes it to the standard soc_version via the legacy conversion layer. | ||
| 114 | std::string result = SimulationPlatform::GetDevicePlatform(); | 169 | std::string result = SimulationPlatform::GetDevicePlatform(); |
| 115 | - EXPECT_EQ(result, "A2A3"); | 170 | + EXPECT_EQ(result, "Ascend910B2"); |
| 116 | } | 171 | } |
| 117 | 172 | ||
| 118 | TEST_F(TestDevicePlatformConfig, INIParserLoadsWithConfigSocVersion) | 173 | TEST_F(TestDevicePlatformConfig, INIParserLoadsWithConfigSocVersion) |
| 119 | { | 174 | { |
| 120 | - config::SetPlatformConfig("device_platform", std::string("ASCEND_950PR_9579")); | 175 | + config::SetPlatformConfig("device_platform", std::string("Ascend950PR_9579")); |
| 121 | DPlatform platform = config::GetDevicePlatform(); | 176 | DPlatform platform = config::GetDevicePlatform(); |
| 122 | EXPECT_EQ(platform, DPlatform::ASCEND_950PR_9579); | 177 | EXPECT_EQ(platform, DPlatform::ASCEND_950PR_9579); |
| 123 | 178 | ||
| 124 | - INIParser parser("950PR_957x"); | 179 | + INIParser parser("Ascend950PR_9579"); |
| 125 | 180 | ||
| 126 | size_t memoryLimit; | 181 | size_t memoryLimit; |
| 127 | EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | 182 | EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); |
| @@ -137,7 +192,7 @@ TEST_F(TestDevicePlatformConfig, INIParserLoadsWithConfigSocVersion) | |||
| 137 | 192 | ||
| 138 | TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9581Config) | 193 | TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9581Config) |
| 139 | { | 194 | { |
| 140 | - INIParser parser("950DT_9581"); | 195 | + INIParser parser("Ascend950DT_9581"); |
| 141 | 196 | ||
| 142 | size_t memoryLimit; | 197 | size_t memoryLimit; |
| 143 | EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | 198 | EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); |
| @@ -155,9 +210,69 @@ TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9581Config) | |||
| 155 | EXPECT_EQ(socVersion, "Ascend950DT_9581"); | 210 | EXPECT_EQ(socVersion, "Ascend950DT_9581"); |
| 156 | } | 211 | } |
| 157 | 212 | ||
| 158 | -TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9581xConfig) | 213 | +TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9582Config) |
| 159 | { | 214 | { |
| 160 | - INIParser parser("950DT_9581x"); | 215 | + INIParser parser("Ascend950DT_9582"); |
| 216 | + | ||
| 217 | + size_t memoryLimit; | ||
| 218 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | ||
| 219 | + EXPECT_EQ(memoryLimit, 253952UL); | ||
| 220 | + | ||
| 221 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, l0cSize, memoryLimit)); | ||
| 222 | + EXPECT_EQ(memoryLimit, 262144UL); | ||
| 223 | + | ||
| 224 | + std::string archType; | ||
| 225 | + EXPECT_TRUE(parser.GetStringVal(version, npuArchInfo, archType)); | ||
| 226 | + EXPECT_EQ(archType, "3510"); | ||
| 227 | + | ||
| 228 | + std::string socVersion; | ||
| 229 | + EXPECT_TRUE(parser.GetStringVal(version, socVersionInfo, socVersion)); | ||
| 230 | + EXPECT_EQ(socVersion, "Ascend950DT_9582"); | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | +TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9572Config) | ||
| 234 | +{ | ||
| 235 | + INIParser parser("Ascend950DT_9572"); | ||
| 236 | + | ||
| 237 | + size_t memoryLimit; | ||
| 238 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | ||
| 239 | + EXPECT_EQ(memoryLimit, 253952UL); | ||
| 240 | + | ||
| 241 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, l0cSize, memoryLimit)); | ||
| 242 | + EXPECT_EQ(memoryLimit, 262144UL); | ||
| 243 | + | ||
| 244 | + std::string archType; | ||
| 245 | + EXPECT_TRUE(parser.GetStringVal(version, npuArchInfo, archType)); | ||
| 246 | + EXPECT_EQ(archType, "3510"); | ||
| 247 | + | ||
| 248 | + std::string socVersion; | ||
| 249 | + EXPECT_TRUE(parser.GetStringVal(version, socVersionInfo, socVersion)); | ||
| 250 | + EXPECT_EQ(socVersion, "Ascend950DT_9572"); | ||
| 251 | +} | ||
| 252 | + | ||
| 253 | +TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950PR9589Config) | ||
| 254 | +{ | ||
| 255 | + INIParser parser("Ascend950PR_9589"); | ||
| 256 | + | ||
| 257 | + size_t memoryLimit; | ||
| 258 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | ||
| 259 | + EXPECT_EQ(memoryLimit, 253952UL); | ||
| 260 | + | ||
| 261 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, l0cSize, memoryLimit)); | ||
| 262 | + EXPECT_EQ(memoryLimit, 262144UL); | ||
| 263 | + | ||
| 264 | + std::string archType; | ||
| 265 | + EXPECT_TRUE(parser.GetStringVal(version, npuArchInfo, archType)); | ||
| 266 | + EXPECT_EQ(archType, "3510"); | ||
| 267 | + | ||
| 268 | + std::string socVersion; | ||
| 269 | + EXPECT_TRUE(parser.GetStringVal(version, socVersionInfo, socVersion)); | ||
| 270 | + EXPECT_EQ(socVersion, "Ascend950PR_9589"); | ||
| 271 | +} | ||
| 272 | + | ||
| 273 | +TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9581XConfig) | ||
| 274 | +{ | ||
| 275 | + INIParser parser("Ascend950DT_9581X"); | ||
| 161 | 276 | ||
| 162 | size_t memoryLimit; | 277 | size_t memoryLimit; |
| 163 | EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | 278 | EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); |
| @@ -175,30 +290,50 @@ TEST_F(TestDevicePlatformConfig, INIParserLoadsNew950DT9581xConfig) | |||
| 175 | EXPECT_EQ(socVersion, "Ascend950DT_9581X"); | 290 | EXPECT_EQ(socVersion, "Ascend950DT_9581X"); |
| 176 | } | 291 | } |
| 177 | 292 | ||
| 293 | +TEST_F(TestDevicePlatformConfig, INIParserLoadsNew9109363Config) | ||
| 294 | +{ | ||
| 295 | + INIParser parser("Ascend910_9363"); | ||
| 296 | + | ||
| 297 | + size_t memoryLimit; | ||
| 298 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, ubSize, memoryLimit)); | ||
| 299 | + EXPECT_EQ(memoryLimit, 196608UL); | ||
| 300 | + | ||
| 301 | + EXPECT_TRUE(parser.GetSizeVal(aiCoreSpec, l0cSize, memoryLimit)); | ||
| 302 | + EXPECT_EQ(memoryLimit, 131072UL); | ||
| 303 | + | ||
| 304 | + std::string archType; | ||
| 305 | + EXPECT_TRUE(parser.GetStringVal(version, npuArchInfo, archType)); | ||
| 306 | + EXPECT_EQ(archType, "2201"); | ||
| 307 | + | ||
| 308 | + std::string socVersion; | ||
| 309 | + EXPECT_TRUE(parser.GetStringVal(version, socVersionInfo, socVersion)); | ||
| 310 | + EXPECT_EQ(socVersion, "Ascend910_9363"); | ||
| 311 | +} | ||
| 312 | + | ||
| 178 | TEST_F(TestDevicePlatformConfig, DifferentPlatformDifferentMemory) | 313 | TEST_F(TestDevicePlatformConfig, DifferentPlatformDifferentMemory) |
| 179 | { | 314 | { |
| 180 | - INIParser parserA2A3("A2A3"); | 315 | + INIParser parser910B1("Ascend910B1"); |
| 181 | - INIParser parser950PR("950PR_957x"); | 316 | + INIParser parser950PR("Ascend950PR_9579"); |
| 182 | INIParser parserKirin("Kirin9030"); | 317 | INIParser parserKirin("Kirin9030"); |
| 183 | 318 | ||
| 184 | - size_t ubA2A3, ub950PR, ubKirin; | 319 | + size_t ub910B1, ub950PR, ubKirin; |
| 185 | - EXPECT_TRUE(parserA2A3.GetSizeVal(aiCoreSpec, ubSize, ubA2A3)); | 320 | + EXPECT_TRUE(parser910B1.GetSizeVal(aiCoreSpec, ubSize, ub910B1)); |
| 186 | EXPECT_TRUE(parser950PR.GetSizeVal(aiCoreSpec, ubSize, ub950PR)); | 321 | EXPECT_TRUE(parser950PR.GetSizeVal(aiCoreSpec, ubSize, ub950PR)); |
| 187 | EXPECT_TRUE(parserKirin.GetSizeVal(aiCoreSpec, ubSize, ubKirin)); | 322 | EXPECT_TRUE(parserKirin.GetSizeVal(aiCoreSpec, ubSize, ubKirin)); |
| 188 | 323 | ||
| 189 | - EXPECT_EQ(ubA2A3, 196608UL); | 324 | + EXPECT_EQ(ub910B1, 196608UL); |
| 190 | EXPECT_EQ(ub950PR, 253952UL); | 325 | EXPECT_EQ(ub950PR, 253952UL); |
| 191 | EXPECT_EQ(ubKirin, 131072UL); | 326 | EXPECT_EQ(ubKirin, 131072UL); |
| 192 | 327 | ||
| 193 | - EXPECT_NE(ubA2A3, ub950PR); | 328 | + EXPECT_NE(ub910B1, ub950PR); |
| 194 | - EXPECT_NE(ubA2A3, ubKirin); | 329 | + EXPECT_NE(ub910B1, ubKirin); |
| 195 | 330 | ||
| 196 | - size_t l0cA2A3, l0c950PR, l0cKirin; | 331 | + size_t l0c910B1, l0c950PR, l0cKirin; |
| 197 | - EXPECT_TRUE(parserA2A3.GetSizeVal(aiCoreSpec, l0cSize, l0cA2A3)); | 332 | + EXPECT_TRUE(parser910B1.GetSizeVal(aiCoreSpec, l0cSize, l0c910B1)); |
| 198 | EXPECT_TRUE(parser950PR.GetSizeVal(aiCoreSpec, l0cSize, l0c950PR)); | 333 | EXPECT_TRUE(parser950PR.GetSizeVal(aiCoreSpec, l0cSize, l0c950PR)); |
| 199 | EXPECT_TRUE(parserKirin.GetSizeVal(aiCoreSpec, l0cSize, l0cKirin)); | 334 | EXPECT_TRUE(parserKirin.GetSizeVal(aiCoreSpec, l0cSize, l0cKirin)); |
| 200 | 335 | ||
| 201 | - EXPECT_EQ(l0cA2A3, 131072UL); | 336 | + EXPECT_EQ(l0c910B1, 131072UL); |
| 202 | EXPECT_EQ(l0c950PR, 262144UL); | 337 | EXPECT_EQ(l0c950PR, 262144UL); |
| 203 | EXPECT_EQ(l0cKirin, 65536UL); | 338 | EXPECT_EQ(l0cKirin, 65536UL); |
| 204 | } | 339 | } |
| @@ -707,7 +707,7 @@ TEST_F(CostModelTest, TestGetCyclesForPassA5) | |||
| 707 | const std::string opCode = "CAST"; | 707 | const std::string opCode = "CAST"; |
| 708 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; | 708 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; |
| 709 | DataType dtype = DataType::DT_INT4; | 709 | DataType dtype = DataType::DT_INT4; |
| 710 | - config::SetPlatformConfig("device_platform", "ASCEND_950PR_9579"); | 710 | + config::SetPlatformConfig("device_platform", "Ascend950PR_9579"); |
| 711 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); | 711 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); |
| 712 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); | 712 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); |
| 713 | EXPECT_GT(cycle, 0); | 713 | EXPECT_GT(cycle, 0); |
| @@ -718,7 +718,7 @@ TEST_F(CostModelTest, TestGetCyclesForPassCopyIn) | |||
| 718 | const std::string opCode = "COPY_IN"; | 718 | const std::string opCode = "COPY_IN"; |
| 719 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; | 719 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; |
| 720 | DataType dtype = DataType::DT_INT4; | 720 | DataType dtype = DataType::DT_INT4; |
| 721 | - config::SetPlatformConfig("device_platform", "ASCEND_950PR_9579"); | 721 | + config::SetPlatformConfig("device_platform", "Ascend950PR_9579"); |
| 722 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); | 722 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); |
| 723 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); | 723 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); |
| 724 | EXPECT_GT(cycle, 0); | 724 | EXPECT_GT(cycle, 0); |
| @@ -729,7 +729,7 @@ TEST_F(CostModelTest, TestGetCyclesForPassCopyOut) | |||
| 729 | const std::string opCode = "COPY_OUT"; | 729 | const std::string opCode = "COPY_OUT"; |
| 730 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; | 730 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; |
| 731 | DataType dtype = DataType::DT_INT4; | 731 | DataType dtype = DataType::DT_INT4; |
| 732 | - config::SetPlatformConfig("device_platform", "ASCEND_950PR_9579"); | 732 | + config::SetPlatformConfig("device_platform", "Ascend950PR_9579"); |
| 733 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); | 733 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); |
| 734 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); | 734 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); |
| 735 | EXPECT_GT(cycle, 0); | 735 | EXPECT_GT(cycle, 0); |
| @@ -740,7 +740,7 @@ TEST_F(CostModelTest, TestGetCyclesForPassSimulate) | |||
| 740 | const std::string opCode = "WHERE_TT"; | 740 | const std::string opCode = "WHERE_TT"; |
| 741 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; | 741 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; |
| 742 | DataType dtype = DataType::DT_INT4; | 742 | DataType dtype = DataType::DT_INT4; |
| 743 | - config::SetPlatformConfig("device_platform", "ASCEND_950PR_9579"); | 743 | + config::SetPlatformConfig("device_platform", "Ascend950PR_9579"); |
| 744 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); | 744 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); |
| 745 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); | 745 | int64_t cycle = CostModel::GetCyclesForPass(opCode, shape, dtype); |
| 746 | EXPECT_GT(cycle, 0); | 746 | EXPECT_GT(cycle, 0); |
| @@ -753,7 +753,7 @@ TEST_F(CostModelTest, TestGetCyclesForPassSo) | |||
| 753 | const std::string opCode = "L1_TO_L0A"; | 753 | const std::string opCode = "L1_TO_L0A"; |
| 754 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; | 754 | std::vector<std::vector<int>> shape = {{1, 1, 1, 1}}; |
| 755 | DataType dtype = DataType::DT_INT4; | 755 | DataType dtype = DataType::DT_INT4; |
| 756 | - config::SetPlatformConfig("device_platform", "ASCEND_950PR_9579"); | 756 | + config::SetPlatformConfig("device_platform", "Ascend950PR_9579"); |
| 757 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); | 757 | config::SetSimConfig(KEY_ACCURACY_LEVEL, 1); |
| 758 | std::string soPath = "libtile_fwk_simulation.so"; | 758 | std::string soPath = "libtile_fwk_simulation.so"; |
| 759 | void* handle = dlopen(soPath.c_str(), RTLD_LAZY); | 759 | void* handle = dlopen(soPath.c_str(), RTLD_LAZY); |
| @@ -61,7 +61,9 @@ def _force_950_platform(request): | |||
| 61 | 61 | ||
| 62 | prev_arch = pypto.platform.npuarch | 62 | prev_arch = pypto.platform.npuarch |
| 63 | pypto.platform.npuarch = "DAV_3510" | 63 | pypto.platform.npuarch = "DAV_3510" |
| 64 | - pypto.set_codegen_options(soc_version="Ascend950") | 64 | + # The 950 pipeline is selected by NPU_ARCH (DAV_3510); no soc_version override is needed: platform |
| 65 | + # specs keep the default bin (same behavior as before the platform config normalization), and there | ||
| 66 | + # is no soc_series config entry - platform inis are keyed by soc_version (chip bin) only. | ||
| 65 | pypto.set_host_options(compile_stage=pypto.CompStage.EXECUTE_GRAPH) | 67 | pypto.set_host_options(compile_stage=pypto.CompStage.EXECUTE_GRAPH) |
| 66 | yield | 68 | yield |
| 67 | pypto.platform.npuarch = prev_arch | 69 | pypto.platform.npuarch = prev_arch |
| @@ -104,9 +106,8 @@ def _compile_only_no_launch(monkeypatch): | |||
| 104 | pto_tensors = self._convert_tensors_with_metadata(torch_tensors, tensor_defs) | 106 | pto_tensors = self._convert_tensors_with_metadata(torch_tensors, tensor_defs) |
| 105 | with pypto.options("jit_scope"): | 107 | with pypto.options("jit_scope"): |
| 106 | self._set_config_option() | 108 | self._set_config_option() |
| 107 | - # Re-apply after jit option merge so 950 target / stage stick. | 109 | + # Re-apply after jit option merge so the 950 stage sticks. |
| 108 | if pypto.platform.npuarch == "DAV_3510": | 110 | if pypto.platform.npuarch == "DAV_3510": |
| 109 | - pypto.set_codegen_options(soc_version="Ascend950") | ||
| 110 | pypto.set_host_options(compile_stage=pypto.CompStage.EXECUTE_GRAPH) | 111 | pypto.set_host_options(compile_stage=pypto.CompStage.EXECUTE_GRAPH) |
| 111 | pypto_impl.DeviceInit() | 112 | pypto_impl.DeviceInit() |
| 112 | self.compile(pto_tensors) | 113 | self.compile(pto_tensors) |