Remove handling of deprecated target names (graviton) (#35537)
* Update target names for Gitlab pipelines * Remove handling of deprecated names for graviton
This commit is contained in:
		 Massimiliano Culpo
					Massimiliano Culpo
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							f9f51cb930
						
					
				
				
					commit
					07e251c887
				
			| @@ -3,7 +3,6 @@ | |||||||
| # | # | ||||||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
| import functools | import functools | ||||||
| import warnings |  | ||||||
| 
 | 
 | ||||||
| import archspec.cpu | import archspec.cpu | ||||||
| 
 | 
 | ||||||
| @@ -33,14 +32,6 @@ def _impl(self, other): | |||||||
|     return _impl |     return _impl | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #: Translation table from archspec deprecated names |  | ||||||
| _DEPRECATED_ARCHSPEC_NAMES = { |  | ||||||
|     "graviton": "cortex_a72", |  | ||||||
|     "graviton2": "neoverse_n1", |  | ||||||
|     "graviton3": "neoverse_v1", |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| class Target(object): | class Target(object): | ||||||
|     def __init__(self, name, module_name=None): |     def __init__(self, name, module_name=None): | ||||||
|         """Target models microarchitectures and their compatibility. |         """Target models microarchitectures and their compatibility. | ||||||
| @@ -52,10 +43,6 @@ def __init__(self, name, module_name=None): | |||||||
|                 like Cray (e.g. craype-compiler) |                 like Cray (e.g. craype-compiler) | ||||||
|         """ |         """ | ||||||
|         if not isinstance(name, archspec.cpu.Microarchitecture): |         if not isinstance(name, archspec.cpu.Microarchitecture): | ||||||
|             if name in _DEPRECATED_ARCHSPEC_NAMES: |  | ||||||
|                 msg = "'target={}' is deprecated, use 'target={}' instead" |  | ||||||
|                 name, old_name = _DEPRECATED_ARCHSPEC_NAMES[name], name |  | ||||||
|                 warnings.warn(msg.format(old_name, name)) |  | ||||||
|             name = archspec.cpu.TARGETS.get(name, archspec.cpu.generic_microarchitecture(name)) |             name = archspec.cpu.TARGETS.get(name, archspec.cpu.generic_microarchitecture(name)) | ||||||
|         self.microarchitecture = name |         self.microarchitecture = name | ||||||
|         self.module_name = module_name |         self.module_name = module_name | ||||||
|   | |||||||
| @@ -218,7 +218,7 @@ spack: | |||||||
|  |  | ||||||
|   - target: |   - target: | ||||||
|     - 'target=aarch64' |     - 'target=aarch64' | ||||||
|     - 'target=graviton2' |     - 'target=neoverse_n1' | ||||||
|  |  | ||||||
|  |  | ||||||
|   specs: |   specs: | ||||||
|   | |||||||
| @@ -125,7 +125,7 @@ spack: | |||||||
|  |  | ||||||
|   - target: |   - target: | ||||||
|     - 'target=aarch64' |     - 'target=aarch64' | ||||||
|     - 'target=graviton2' |     - 'target=neoverse_n1' | ||||||
|  |  | ||||||
|  |  | ||||||
|   specs: |   specs: | ||||||
|   | |||||||
| @@ -43,7 +43,7 @@ spack: | |||||||
|  |  | ||||||
|   - target: |   - target: | ||||||
|     - 'target=aarch64' |     - 'target=aarch64' | ||||||
|     - 'target=graviton2' |     - 'target=neoverse_n1' | ||||||
|  |  | ||||||
|   specs: |   specs: | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user