- 
                Notifications
    
You must be signed in to change notification settings  - Fork 794
 
[Driver] Enable SYCL AOT compilation using --offload-arch #15353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Closed
      
      
    
  
     Closed
                    Changes from 4 commits
      Commits
    
    
            Show all changes
          
          
            16 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      afd6a5c
              
                [Driver] Enable --offload-arch for SYCL AOT compilation with the new
              
              
                srividya-sundaram d5339a0
              
                Add initial test.
              
              
                srividya-sundaram 7828b8e
              
                Fix test failures.
              
              
                srividya-sundaram 9acfa69
              
                Update test for all Intel CPUs.
              
              
                srividya-sundaram 26dd5ec
              
                Add SYCL --offload-arch tests for AMD targets.
              
              
                srividya-sundaram b7a3aec
              
                Update Intel GPU tests.
              
              
                srividya-sundaram aa54427
              
                Add NVidia GPU tests.
              
              
                srividya-sundaram 81fa084
              
                Add diagnostic back.
              
              
                srividya-sundaram 8e8a0ef
              
                Resolve conflict.
              
              
                srividya-sundaram 64ee8c0
              
                Merge branch 'sycl' into offload-arch-aot
              
              
                srividya-sundaram ed5902f
              
                Fix failing test.
              
              
                srividya-sundaram 4692758
              
                Merge branch 'offload-arch-aot' of https://github.com/srividya-sundar…
              
              
                srividya-sundaram c718ec9
              
                Fix failing test.
              
              
                srividya-sundaram 0f16679
              
                clang format fix.
              
              
                srividya-sundaram 34002a2
              
                Fix test.
              
              
                srividya-sundaram d14865d
              
                Add AMD and NVidia Mapping in SYCL.cpp
              
              
                srividya-sundaram File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| /// Tests the behaviors of using -fsycl --offload-new-driver | ||
| // --offload-arch=<intel-gpu/cpu-values>. | ||
| 
     | 
||
| // SYCL AOT compilation to Intel CPUs using --offload-arch | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=broadwell %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=broadwell | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=coffeelake %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=coffeelake | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=icelake-client %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=icelake-client | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=skylake-avx512 %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=skylake-avx512 | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=core-avx2 %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=core-avx2 | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=corei7-avx %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=corei7-avx | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=corei7 %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=corei7 | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=westmere %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=westmere | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=sandybridge %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=sandybridge | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=ivybridge %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=ivybridge | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=alderlake %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=alderlake | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=skylake %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=skylake | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=skx %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=skx | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=cascadelake %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=cascadelake | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=icelake-server %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=icelake-server | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=sapphirerapids %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=sapphirerapids | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=graniterapids %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-CPU,CLANG-OFFLOAD-PACKAGER-CPU -DDEV_STR=graniterapids | ||
| 
     | 
||
| // TARGET-TRIPLE-CPU: clang{{.*}} "-triple" "spir64_x86_64-unknown-unknown" | ||
| // TARGET-TRIPLE-CPU: "-D__SYCL_TARGET_INTEL_X86_64__" | ||
| // CLANG-OFFLOAD-PACKAGER-CPU: clang-offload-packager{{.*}} "--image={{.*}}triple=spir64_x86_64-unknown-unknown,arch=[[DEV_STR]],kind=sycl" | ||
| 
     | 
||
| 
     | 
||
| // SYCL AOT compilation to Intel GPUs using --offload-arch | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=bdw %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-GPU,CLANG-OFFLOAD-PACKAGER-GPU -DDEV_STR=bdw -DMAC_STR=BDW | ||
| 
     | 
||
| // RUN: %clangxx -### --offload-new-driver -fsycl --offload-arch=cfl %s 2>&1 | \ | ||
| // RUN: FileCheck %s --check-prefixes=TARGET-TRIPLE-GPU,CLANG-OFFLOAD-PACKAGER-GPU -DDEV_STR=cfl -DMAC_STR=CFL | ||
| 
     | 
||
| // TARGET-TRIPLE-GPU: clang{{.*}} "-triple" "spir64_gen-unknown-unknown" | ||
| // TARGET-TRIPLE-GPU: "-D__SYCL_TARGET_INTEL_GPU_[[MAC_STR]]__" | ||
| // CLANG-OFFLOAD-PACKAGER-GPU: clang-offload-packager{{.*}} "--image={{.*}}triple=spir64_gen-unknown-unknown,arch=[[DEV_STR]],kind=sycl" | ||
| 
     | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.