已合并
同步:将 TA3.6 编译选项适配同步至 master #45334
luqichao创建于 19 天前
同步:将 TA3.6 编译选项适配同步至 master #45334
已合并
共 2 个文件变更+7-3
| @@ -34,7 +34,7 @@ class NPUKernelType(Enum): | |||
| 34 | 34 | ||
| 35 | def compile_mode(self): | 35 | def compile_mode(self): |
| 36 | if self == NPUKernelType.SIMT_TEMPLATE: | 36 | if self == NPUKernelType.SIMT_TEMPLATE: |
| 37 | - return "unstructured_in_simt" | 37 | + return "simd_simt_template" |
| 38 | return str(self) | 38 | return str(self) |
| 39 | 39 | ||
| 40 | 40 | ||
| @@ -763,7 +763,9 @@ class NPUCachingAutotuner(CachingAutotuner): | |||
| 763 | and not self.inductor_meta.get("is_hip", False) | 763 | and not self.inductor_meta.get("is_hip", False) |
| 764 | ) | 764 | ) |
| 765 | 765 | ||
| 766 | - compile_meta['compile_mode'] = cfg_kwargs.get('compile_mode') | 766 | + compile_meta['compile_mode'] = ( |
| 767 | + cfg_kwargs.get('compile_mode') or NPUKernelType.SIMT_TEMPLATE.compile_mode() | ||
| 768 | + ) | ||
| 767 | 769 | ||
| 768 | # device type will be "hip" rather than "cuda" here | 770 | # device type will be "hip" rather than "cuda" here |
| 769 | compile_meta["device_type"] = self.device_props.type | 771 | compile_meta["device_type"] = self.device_props.type |
| @@ -1245,7 +1247,9 @@ class NPUCachingAutotuner(CachingAutotuner): | |||
| 1245 | and not self.inductor_meta.get("is_hip", False) | 1247 | and not self.inductor_meta.get("is_hip", False) |
| 1246 | ) | 1248 | ) |
| 1247 | 1249 | ||
| 1248 | - compile_meta['compile_mode'] = cfg_kwargs.get('compile_mode') | 1250 | + compile_meta['compile_mode'] = ( |
| 1251 | + cfg_kwargs.get('compile_mode') or NPUKernelType.SIMT_TEMPLATE.compile_mode() | ||
| 1252 | + ) | ||
| 1249 | 1253 | ||
| 1250 | # device type will be "hip" rather than "cuda" here | 1254 | # device type will be "hip" rather than "cuda" here |
| 1251 | compile_meta["device_type"] = self.device_props.type | 1255 | compile_meta["device_type"] = self.device_props.type |