[libclc] r342341 - configure: Rework support for gfx9+ devices that were added post LLVM 3.9
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 15 15:02:02 PDT 2018
Author: jvesely
Date: Sat Sep 15 15:02:01 2018
New Revision: 342341
URL: http://llvm.org/viewvc/llvm-project?rev=342341&view=rev
Log:
configure: Rework support for gfx9+ devices that were added post LLVM 3.9
v2: Fix reference to Vega12/20 enabling commit
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewer: Aaron Watry
Modified:
libclc/trunk/configure.py
Modified: libclc/trunk/configure.py
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/configure.py?rev=342341&r1=342340&r2=342341&view=diff
==============================================================================
--- libclc/trunk/configure.py (original)
+++ libclc/trunk/configure.py Sat Sep 15 15:02:01 2018
@@ -100,15 +100,25 @@ available_targets = {
{'gpu' : 'barts', 'aliases' : ['turks', 'caicos'] },
{'gpu' : 'cayman', 'aliases' : ['aruba']} ]},
'amdgcn--': { 'devices' :
- [{'gpu' : 'tahiti', 'aliases' : ['pitcairn', 'verde', 'oland', 'hainan', 'bonaire', 'kabini', 'kaveri', 'hawaii', 'mullins', 'tonga', 'iceland', 'carrizo', 'fiji', 'stoney', 'polaris10', 'polaris11', 'gfx900']} ]},
+ [{'gpu' : 'tahiti', 'aliases' : ['pitcairn', 'verde', 'oland', 'hainan', 'bonaire', 'kabini', 'kaveri', 'hawaii', 'mullins', 'tonga', 'iceland', 'carrizo', 'fiji', 'stoney', 'polaris10', 'polaris11']} ]},
'amdgcn--amdhsa': { 'devices' :
- [{'gpu' : '', 'aliases' : ['bonaire', 'kabini', 'kaveri', 'hawaii', 'mullins', 'tonga', 'iceland', 'carrizo', 'fiji', 'stoney', 'polaris10', 'polaris11', 'gfx900']} ]},
+ [{'gpu' : '', 'aliases' : ['bonaire', 'kabini', 'kaveri', 'hawaii', 'mullins', 'tonga', 'iceland', 'carrizo', 'fiji', 'stoney', 'polaris10', 'polaris11']} ]},
'nvptx--' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
'nvptx64--' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
'nvptx--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
'nvptx64--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
}
+# Support for gfx9 was added in LLVM 5 (r295554)
+if llvm_int_version >= 500:
+ available_targets['amdgcn--']['devices'][0]['aliases'] += ['gfx900', 'gfx902']
+ available_targets['amdgcn--amdhsa']['devices'][0]['aliases'] += ['gfx900', 'gfx902']
+
+# Support for Vega12 and Vega20 was added in LLVM 7 (r331215)
+if llvm_int_version >= 700:
+ available_targets['amdgcn--']['devices'][0]['aliases'] += ['gfx904', 'gfx906']
+ available_targets['amdgcn--amdhsa']['devices'][0]['aliases'] += ['gfx904', 'gfx906']
+
default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--', 'amdgcn--', 'amdgcn--amdhsa']
More information about the cfe-commits
mailing list