Skip to content

[UR][L0] Re-enable driver in-order list #18169

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

Draft
wants to merge 2 commits into
base: sycl
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main() {

for (size_t i = 0; i < Size; i++) {
T Ref = Pattern * i;
assert(Output[i] == Ref);
assert(check_value(i, Ref, Output[i], "Output"));
}

return 0;
Expand Down
13 changes: 7 additions & 6 deletions sycl/test-e2e/Graph/RecordReplay/usm_copy_in_order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ int main() {
// Shouldn't be captured in graph as a dependency
Queue.submit([&](handler &CGH) {
CGH.parallel_for(N, [=](id<1> it) {
X[it] += 0.5f;
Y[it] += 0.5f;
Z[it] += 0.5f;
X[it] += 1.0f;
Y[it] += 1.0f;
Z[it] += 1.0f;
});
});

Expand All @@ -67,14 +67,15 @@ int main() {
// memcpy from 2.0 Y values to Z
Queue.submit([&](handler &CGH) { CGH.memcpy(Z, Y, N * sizeof(int)); });

std::vector<int> Output(N);
Queue.memcpy(Output.data(), Z, N * sizeof(int));

Graph.end_recording();

auto ExecGraph = Graph.finalize();

Queue.submit([&](handler &CGH) { CGH.ext_oneapi_graph(ExecGraph); });

std::vector<int> Output(N);
Queue.memcpy(Output.data(), Z, N * sizeof(int)).wait();
Queue.wait_and_throw();

const int Expected = 2;
for (size_t i = 0; i < N; i++) {
Expand Down
20 changes: 1 addition & 19 deletions unified-runtime/source/adapters/level_zero/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,25 +547,7 @@ ur_result_t ur_platform_handle_t_::initialize() {
}

bool ur_platform_handle_t_::allowDriverInOrderLists(bool OnlyIfRequested) {
// Use in-order lists implementation from L0 driver instead
// of adapter's implementation.

// The following driver version is known to be passing and only this or newer
// drivers should be allowed by default for in order lists.
#define L0_DRIVER_INORDER_MINOR_VERSION 6
#define L0_DRIVER_INORDER_PATCH_VERSION 32149

static const bool UseEnvVarDriverInOrderLists = [&] {
const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS");
return UrRet ? std::atoi(UrRet) != 0 : false;
}();
static const bool UseDriverInOrderLists = [this] {
bool CompatibleDriver = this->isDriverVersionNewerOrSimilar(
1, L0_DRIVER_INORDER_MINOR_VERSION, L0_DRIVER_INORDER_PATCH_VERSION);
return CompatibleDriver || UseEnvVarDriverInOrderLists;
}();

return OnlyIfRequested ? UseEnvVarDriverInOrderLists : UseDriverInOrderLists;
return OnlyIfRequested;
}

/// Checks the version of the level-zero driver.
Expand Down
Loading