File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 114114
115115if triple == 'amdgcn-amd-amdhsa' :
116116 config .available_features .add ('hip_amd' )
117- # For AMD the specific GPU has to be specified with --offload-arch, only
118- # compiler tests are run so hardcode the offload arch to gfx906
119- additional_flags += ['-Xsycl-target-backend=amdgcn-amd-amdhsa' ,
120- '--offload-arch=gfx906' ]
117+ # For AMD the specific GPU has to be specified with --offload-arch
118+ if not any ([f .startswith ('--offload-arch' ) for f in additional_flags ]):
119+ # If the offload arch wasn't specified in SYCL_CLANG_EXTRA_FLAGS,
120+ # hardcode it to gfx906, this is fine because only compiler tests
121+ additional_flags += ['-Xsycl-target-backend=amdgcn-amd-amdhsa' ,
122+ '--offload-arch=gfx906' ]
121123
122124llvm_config .use_clang (additional_flags = additional_flags )
123125
You can’t perform that action at this time.
0 commit comments