-
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.
[SYCLomaitc][PyTorch][Bug] Fix user_defined_rule_pytorch.yaml rule co…
…py bug (#2535)
- Loading branch information
1 parent
186d502
commit efee38d
Showing
8 changed files
with
33 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: rm -rf %T/pytorch/ATen | ||
// RUN: mkdir -p %T/pytorch/ATen/src | ||
// RUN: cp %S/ATen.cu %T/pytorch/ATen/src/ | ||
// RUN: cp %S/user_defined_rule_pytorch.yaml %T/pytorch/ATen/ | ||
// RUN: cp -r %S/pytorch_cuda_inc %T/pytorch/ATen/ | ||
// RUN: cd %T/pytorch/ATen | ||
// RUN: mkdir dpct_out | ||
// RUN: dpct -out-root dpct_out src/ATen.cu --extra-arg="-I./pytorch_cuda_inc" --cuda-include-path="%cuda-path/include" --rule-file=user_defined_rule_pytorch.yaml -- -x cuda --cuda-host-only | ||
// RUN: FileCheck --input-file dpct_out/ATen.dp.cpp --match-full-lines src/ATen.cu | ||
// RUN: %if build_lit %{icpx -c -fsycl -DNO_BUILD_TEST dpct_out/ATen.dp.cpp -o dpct_out/ATen.dp.o %} | ||
|
||
#ifndef NO_BUILD_TEST | ||
#include <iostream> | ||
// CHECK: #include <ATen/xpu/XPUContext.h> | ||
#include <ATen/cuda/CUDAContext.h> | ||
// CHECK: #include <ATen/core/Tensor.h> | ||
#include <ATen/core/Tensor.h> | ||
|
||
int main() { | ||
|
||
return 0; | ||
} | ||
#endif |
21 changes: 10 additions & 11 deletions
21
clang/test/dpct/pytorch_c10_cuda_ns.cu → clang/test/dpct/pytorch/c10.cu
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.