Skip to content

[SYCL] [L0] Recycle immediate command lists for queues in a context. #9409

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 19 commits into from
May 23, 2023

Conversation

rdeodhar
Copy link
Contributor

@rdeodhar rdeodhar commented May 11, 2023

Cache immediate command lists in a context when a queue is released, Then reuse them for other queues created in that context.
Waiting until context deletion to delete immediate command lists could possibly exhaust device memory when many queues are created and destroyed within the same context.

@rdeodhar rdeodhar temporarily deployed to aws May 11, 2023 01:08 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 11, 2023 01:42 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 12, 2023 02:09 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 12, 2023 07:32 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 12, 2023 08:55 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 12, 2023 16:25 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 12, 2023 18:39 — with GitHub Actions Inactive
@rdeodhar rdeodhar marked this pull request as ready for review May 12, 2023 19:31
@rdeodhar rdeodhar requested review from a team as code owners May 12, 2023 19:31
@rdeodhar rdeodhar requested a review from aelovikov-intel May 12, 2023 19:31
@rdeodhar rdeodhar temporarily deployed to aws May 13, 2023 21:39 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 13, 2023 22:11 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 14, 2023 18:01 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 14, 2023 18:32 — with GitHub Actions Inactive
@rdeodhar rdeodhar requested a review from smaslov-intel May 14, 2023 19:55
@rdeodhar rdeodhar temporarily deployed to aws May 17, 2023 23:35 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 18, 2023 00:27 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 18, 2023 00:59 — with GitHub Actions Inactive

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: smaslov-intel <[email protected]>
@rdeodhar rdeodhar temporarily deployed to aws May 18, 2023 23:01 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 19, 2023 00:51 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 19, 2023 19:26 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 19, 2023 20:43 — with GitHub Actions Inactive
test(sycl::property_list{});

// CHECK: [getZeQueue]: create queue {{.*}} priority = Normal
// CHECK-STD: [getZeQueue]: create queue {{.*}} priority = Normal
Copy link
Contributor

Choose a reason for hiding this comment

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

Please either add a CHECK-IMM or a comment why it shouldn't be here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CHECK-IMM is not needed here precisely because of IMM recycling.
I've added a comment saying so.

Comment on lines 3 to 4
// RUN: env ZE_DEBUG=1 env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-STD
// RUN: env ZE_DEBUG=1 env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-IMM
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// RUN: env ZE_DEBUG=1 env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-STD
// RUN: env ZE_DEBUG=1 env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-IMM
// RUN: env ZE_DEBUG=1 SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-STD
// RUN: env ZE_DEBUG=1 SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK-IMM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK.

@rdeodhar rdeodhar temporarily deployed to aws May 22, 2023 18:45 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 22, 2023 20:21 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 22, 2023 23:09 — with GitHub Actions Inactive
@rdeodhar rdeodhar temporarily deployed to aws May 22, 2023 23:41 — with GitHub Actions Inactive
@againull againull merged commit 2ddbf8c into intel:sycl May 23, 2023
jandres742 pushed a commit to jandres742/llvm that referenced this pull request May 23, 2023
jandres742 pushed a commit to jandres742/llvm that referenced this pull request May 26, 2023
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.

None yet

4 participants