Skip to content
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

[Bug][Python Build Script Migration] Adding extension migration to files inside list #2557

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang/test/dpct/python_migration/case_007/expected.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
out = func("bar.dp.cpp", "baz.cpp")
# foo.cpp is a C++ file with CUDA syntax
out = func("foo.cpp.dp.cpp", "bar.dp.cpp")
out = func(["foo.cpp.dp.cpp", "bar.dp.cpp"])
1 change: 1 addition & 0 deletions clang/test/dpct/python_migration/case_007/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
out = func("bar.cu", "baz.cpp")
# foo.cpp is a C++ file with CUDA syntax
out = func("foo.cpp", "bar.cu")
out = func(["foo.cpp", "bar.cu"])
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@
In: BuildExtension
Out: DpcppBuildExtension

- Rule: rule_cpp_file
- Rule: rule_cpp_file_in_func
Kind: PythonRule
Priority: Fallback
MatchMode: Partial
PythonSyntax: cpp_file
PythonSyntax: cpp_file_in_func
In: ${func_name}(${value})
Out: ${func_name}(${value})
Subrules:
Expand All @@ -146,11 +146,24 @@
In: ${arg}.cpp
Out: ${arg}.${rewrite_extention_name}

- Rule: rule_cu_file
- Rule: rule_cpp_file_in_list
Kind: PythonRule
Priority: Fallback
MatchMode: Partial
PythonSyntax: cu_file
PythonSyntax: cpp_file_in_list
In: "[${value}]"
Out: "[${value}]"
Subrules:
value:
MatchMode: Full
In: ${arg}.cpp
Out: ${arg}.${rewrite_extention_name}

- Rule: rule_cu_file_in_func
Kind: PythonRule
Priority: Fallback
MatchMode: Partial
PythonSyntax: cu_file_in_func
In: ${func_name}(${value})
Out: ${func_name}(${value})
Subrules:
Expand All @@ -159,6 +172,19 @@
In: ${arg}.cu
Out: ${arg}.${rewrite_extention_name}

- Rule: rule_cu_file_in_list
Kind: PythonRule
Priority: Fallback
MatchMode: Partial
PythonSyntax: cu_file_in_list
In: "[${value}]"
Out: "[${value}]"
Subrules:
value:
MatchMode: Full
In: ${arg}.cu
Out: ${arg}.${rewrite_extention_name}

- Rule: rule_cuda_device_count
Kind: PythonRule
Priority: Fallback
Expand Down