[Libclc-dev] [PATCH] configure: Rework support for gfx9+ devices that were added post LLVM 3.9

Aaron Watry via Libclc-dev libclc-dev at lists.llvm.org
Fri Sep 14 19:51:28 PDT 2018


LGTM, although you might want to check that commit ID for the LLVM 7
addition of vega12/20. I suspect there's one too many 3's in that.

--Aaron
On Tue, Sep 11, 2018 at 10:32 PM Jan Vesely via Libclc-dev
<libclc-dev at lists.llvm.org> wrote:
>
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
>  configure.py | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/configure.py b/configure.py
> index 56723f7..b6ab1a1 100755
> --- a/configure.py
> +++ b/configure.py
> @@ -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 (r3331215)
> +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']
>
> --
> 2.16.4
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev


More information about the Libclc-dev mailing list