Skip to content

[SYCL][E2E] Fix preview flag detection for CUDA and HIP #11929

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

Merged
merged 5 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: preview-breaking-changes-supported

// RUN: %clangxx -fsycl -fpreview-breaking-changes %s -o %t
// RUN: %clangxx -fsycl -fpreview-breaking-changes %s -o %t.out
// RUN: %{run} %t.out

// Test to help identify that E2E testing correctly detects and uses the preview
Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ def get_extra_env(sycl_devices):
# Expand device-specific condtions (%if ... %{ ... %}).
tmp_script = [ cmd ]
conditions = {x: True for x in sycl_device.split(':')}
for op_sys in ['linux', 'windows']:
if op_sys in test.config.available_features:
conditions[op_sys] = True
for cond_features in ['linux', 'windows', 'preview-breaking-changes-supported']:
if cond_features in test.config.available_features:
conditions[cond_features] = True

tmp_script = lit.TestRunner.applySubstitutions(
tmp_script, [], conditions, recursion_limit=test.config.recursiveExpansionLimit)
Expand Down
10 changes: 5 additions & 5 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@
# Check for sycl-preview library
check_preview_breaking_changes_file='preview_breaking_changes_link.cpp'
with open(check_preview_breaking_changes_file, 'w') as fp:
fp.write('#include <sycl/sycl.hpp>')
fp.write('namespace sycl { inline namespace _V1 { namespace detail {')
fp.write('extern void PreviewMajorReleaseMarker();')
fp.write('}}}')
fp.write('int main() { sycl::detail::PreviewMajorReleaseMarker(); return 0; }')
fp.write('#include <sycl/sycl.hpp>\n')
fp.write('namespace sycl { inline namespace _V1 { namespace detail {\n')
fp.write('extern void PreviewMajorReleaseMarker();\n')
fp.write('}}}\n')
fp.write('int main() { sycl::detail::PreviewMajorReleaseMarker(); return 0; }\n')

sp = subprocess.getstatusoutput(config.dpcpp_compiler+' -fsycl -fpreview-breaking-changes ' + check_preview_breaking_changes_file)
if sp[0] == 0:
Expand Down