-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCLomatic] Extend ananlysis mode to report unsupported APIs and typ…
…es (#2595) Signed-off-by: Ziran Zhang <ziran.zhang@intel.com>
- Loading branch information
Showing
8 changed files
with
93 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,11 @@ | ||
// CHECK: Total Project: | ||
// CHECK-NEXT: + {{[0-9]+}} lines of code ( {{[0-9]+}}%) will be automatically migrated. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - No manual effort. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - Low manual effort for checking and code fixing. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - Medium manual effort for code fixing. | ||
// CHECK-NEXT: + {{[0-9]+}} lines of code ( {{[0-9]+}}%) will not be automatically migrated. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - High manual effort for code fixing. | ||
// CHECK: Library Dependencies of SYCL Project: | ||
// CHECK-NEXT: - The Intel oneAPI Math Kernel Library (oneMKL) | ||
// CHECK-NEXT: Unsupported APIs and Types: | ||
// CHECK-NEXT: - cudaDeviceGetPCIBusId Occurrences 2 times |
This file contains 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,15 @@ | ||
// RUN: dpct %S/multi_files.cu -in-root=%S -out-root=%T/multi -analysis-mode -analysis-mode-output-file=%T/multi_report.out | ||
|
||
// RUN: echo "// CHECK: %S/multi_files.cu:" > %T/multi_files.check | ||
// RUN: echo "// CHECK: %S/multi_files.h:" >> %T/multi_files.check | ||
// RUN: cat %S/multi_files.check >> %T/multi_files.check | ||
|
||
// RUN: FileCheck --match-full-lines --input-file %T/multi_report.out %T/multi_files.check | ||
|
||
#include "multi_files.h" | ||
|
||
void foo() { | ||
int *a; | ||
cudaDeviceGetPCIBusId(nullptr, 0, 0); | ||
cudaMalloc(&a, sizeof(int) * 4); | ||
} |
This file contains 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,7 @@ | ||
#include "cublas.h" | ||
|
||
void foo_h() { | ||
int *a; | ||
cudaDeviceGetPCIBusId(nullptr, 0, 0); | ||
cudaMalloc(&a, sizeof(int) * 4); | ||
} |
This file contains 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,11 @@ | ||
// CHECK-NEXT: + {{[0-9]+}} lines of code ( {{[0-9]+}}%) will be automatically migrated. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - No manual effort. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - Low manual effort for checking and code fixing. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - Medium manual effort for code fixing. | ||
// CHECK-NEXT: + {{[0-9]+}} lines of code ( {{[0-9]+}}%) will not be automatically migrated. | ||
// CHECK-NEXT: - {{[0-9]+}} APIs/Types - High manual effort for code fixing. | ||
// CHECK-NEXT: Library Dependencies of SYCL Project: | ||
// CHECK-NEXT: - The Intel oneAPI Deep Neural Network Library (oneDNN) | ||
// CHECK-NEXT: Unsupported APIs and Types: | ||
// CHECK-NEXT: - cudaDeviceGetPCIBusId Occurrences 2 times | ||
// CHECK-NEXT: - cudnnReduceTensorIndices_t Occurrences 1 times |
This file contains 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,16 @@ | ||
// RUN: dpct -in-root=%S -out-root=%T/single -analysis-mode -analysis-mode-output-file=%T/single_file.out %S/single_file.cu | ||
|
||
// RUN: echo "// CHECK: %S/single_file.cu:" > %T/single_file.check | ||
// RUN: cat %S/single_file.check >> %T/single.check | ||
|
||
// RUN: FileCheck --match-full-lines --input-file %T/single_file.out %T/single_file.check | ||
|
||
#include "cudnn.h" | ||
|
||
void foo() { | ||
int *a; | ||
cudnnReduceTensorIndices_t m; | ||
cudaDeviceGetPCIBusId(nullptr, 0, 0); | ||
cudaDeviceGetPCIBusId(nullptr, 0, 0); | ||
cudaMalloc(&a, sizeof(int) * 4); | ||
} |