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

[SYCL][NewOffload][E2E] add a single test for --offload-new-driver #14129

Merged
merged 11 commits into from
Jun 12, 2024

Conversation

jasonlizhengjian
Copy link
Contributor

A single basic file to compile and run to test functionality of --offload-new-driver

// RUN: %{build} --offload-new-driver -o %t.out
// RUN: %{run} %t.out

#include <sycl/sycl.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to use a subset here. Please do:

Suggested change
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

@asudarsa
Copy link
Contributor

Currently, we support only JIT compilation flows in SYCL offloading using new offload model. This test will fail for AOT compilations.

Thanks

@jasonlizhengjian jasonlizhengjian changed the title [SYCL] add a single test for --offload-new-driver [SYCL][NewOffload][E2E] add a single test for --offload-new-driver Jun 11, 2024
@@ -0,0 +1,48 @@
// REQUIRES: level_zero
// RUN: %{build} --offload-new-driver -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to force JIT i think we can do
%clangxx -fsycl --offload-new-driver ...
because if it's set up for AOT, %{build} will expand to AOT options

@@ -0,0 +1,48 @@
// REQUIRES: level_zero
// RUN: %clangxx --offload-new-driver -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we need -fsycl here

@sarnex
Copy link
Contributor

sarnex commented Jun 11, 2024

LGTM, will approve after CI passes

@jasonlizhengjian jasonlizhengjian marked this pull request as ready for review June 11, 2024 15:12
@jasonlizhengjian jasonlizhengjian requested a review from a team as a code owner June 11, 2024 15:12
Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Couple of nits. (1) it is a good idea to add a comment at the top mentioning what the test does. I am ok to start doing this from the next PR. and (2) EOF seems to be missing a linebreak.
(2) can be addressed just before merging (after CI testing is complete).

Thanks again for adding this.

@sarnex
Copy link
Contributor

sarnex commented Jun 11, 2024

@jasonlizhengjian I think we just have to fix the formatting and then we are ready to merge!

Comment on lines 1 to 3
// REQUIRES: level_zero
// RUN: %clangxx -fsycl --offload-new-driver %s -o %t.out
// RUN: %{run} %t.out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be below the copyright header

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we even have a copyright header in E2E tests? Currently, some of our tests have a copyright header, while others don't.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this pr has been through a lot of iteration already, we should resolve this question in general for all tests outside of this pr and then make a changing implementing the rule (and ideally a CI check to enforce it in the future

@sarnex
Copy link
Contributor

sarnex commented Jun 12, 2024

@intel/llvm-reviewers-runtime Can someone please take a look at this? It's actually testing a dpcpp tools feature so should not be a difficult review! Thanks!

sycl/test-e2e/NewOffloadDriver/buffer.cpp Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
sycl/test-e2e/NewOffloadDriver/buffer.cpp Outdated Show resolved Hide resolved
Co-authored-by: Marcos Maronas <maarquitos14@users.noreply.github.com>
@sarnex sarnex merged commit fe8c284 into intel:sycl Jun 12, 2024
14 checks passed
ianayl pushed a commit to ianayl/sycl that referenced this pull request Jun 13, 2024
…ntel#14129)

A single basic file to compile and run to test functionality of
--offload-new-driver

---------

Co-authored-by: Marcos Maronas <maarquitos14@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants