Skip to content

Mirror intel/llvm commits #2784

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 2 commits into from
Jun 11, 2025
Merged

Mirror intel/llvm commits #2784

merged 2 commits into from
Jun 11, 2025

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Jun 11, 2025

Automated changes by create-pull-request GitHub action

againull and others added 2 commits June 11, 2025 00:45
Current "submission time" calculation is inaccurate because we don't use
both synchronized timestamps returned by zeDeviceGetGlobalTimestamps but
using only device timestamp from that call and use std::chrono "close"
to that call to record the host time. This estimation becomes inaccurate
pretty quickly. This PR fixes this problem using the known fact that L0
runtime implementation uses CLOCK_MONOTONIC_RAW on Linux and
QueryPerformanceCounter on Windows.
So, with this fix, at the first call, we use both device and host
timestamps from zeDeviceGetGlobalTimestamps, subsequent calls (when
device timestamp is not requested) will return corresponding host
timestamp only, without making the `zeDeviceGetGlobalTimestamps` call
which has high latency.

Even though this approach improves accuracy and submit time doesn't
become "invalid" (submit time > start_time) fast, it still doesn't
guarantee that it will not happen. So, there will be additional fix done
in intel/llvm#18717 to fix that. Test is also
updated there to check larger number of iterations.

Also apply the same fix as
intel/llvm@138bef7
for cuda adapter (i.e. record host time after cuEventSynchronize for
more precise measurement)
@kbenzie kbenzie requested a review from a team as a code owner June 11, 2025 00:45
@github-actions github-actions bot added ci/cd Continuous integration/devliery level-zero L0 adapter specific issues cuda CUDA adapter specific issues auto-close labels Jun 11, 2025
Copy link
Contributor

Unified Runtime -> intel/llvm Repo Move Notice

Information

The source code of Unified Runtime has been moved to intel/llvm under the unified-runtime top-level directory,
all future development will now be carried out there. This was done in intel/llvm#17043.

The code will be mirrored to oneapi-src/unified-runtime and the specification will continue to be hosted at oneapi-src.github.io/unified-runtime.

The contribution guide will be updated with new instructions for contributing to Unified Runtime.

PR Migration

All open PRs including this one will be marked with the auto-close label and shall be automatically closed after 30 days.

Should you wish to continue with your PR you will need to migrate it to intel/llvm.
We have provided a script to help automate this process.

If your PR should remain open and not be closed automatically, you can remove the auto-close label.


This is an automated comment.

@kbenzie kbenzie merged commit b65be7f into main Jun 11, 2025
1 check passed
@kbenzie kbenzie deleted the mirror-commits- branch June 11, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-close ci/cd Continuous integration/devliery cuda CUDA adapter specific issues level-zero L0 adapter specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants