-
Notifications
You must be signed in to change notification settings - Fork 124
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
Tidy and move common adapter code to ur_common #997
Conversation
2750320
to
159963b
Compare
adapters already link with common. Any reason this new stuff can't be part of that library? there's already an |
That might make more sense, yeah. |
698f581
to
ac29419
Compare
I'm waiting for the CI to rerun on the latest commit, but after moving this into common the quick fuzztest job was failing because of ODR violations. I think because common is an interface library the definitions in |
Sounds like it should be a static library instead. |
In fact, it already is on the main branch https://github.com/oneapi-src/unified-runtime/blob/main/source/common/CMakeLists.txt#L9 |
I have updated the target branch of this PR from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase.
471c118
to
4f70a6b
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #997 +/- ##
==========================================
- Coverage 15.59% 15.57% -0.02%
==========================================
Files 232 231 -1
Lines 32089 32087 -2
Branches 3638 3638
==========================================
- Hits 5003 4999 -4
- Misses 27036 27037 +1
- Partials 50 51 +1 ☔ View full report in Codecov by Sentry. |
4f70a6b
to
482eec0
Compare
adapter_util
static library
I've rebased now. Note that I had to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
native cpu LGTM, thank you
8e9b6d0
to
3424ed7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source/adapters/*/image.cpp
changes LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command-buffer changes LGTM
c0b5155
to
d867d48
Compare
@oneapi-src/unified-runtime-cuda-write @oneapi-src/unified-runtime-hip-write @oneapi-src/unified-runtime-level-zero-write Please review when you get a chance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CUDA and HIP changes after refactor look good to me.
@@ -10,7 +10,7 @@ | |||
#pragma once | |||
|
|||
#include <cuda.h> | |||
#include <ur/ur.hpp> | |||
#include <ur_api.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a distinction between the #include <ur_api.h>
(h-char-sequence) and #include "ur_api.h"
(q-char-sequence). Though the c99 standard (and by reference c++11 - c++20) leave latitude for interpretation of these two forms, it's standard practise to use the "q" form for internal includes and the "h" form for system includes (see e.g. llvm).
Since ur_api.h is part of the present project, I believe all instances should the quoted form. Such a general cleanup certainly belongs in a separate patch, but for all changes introduced changes here, I think it makes sense to use q-char uniformly
source/adapters/cuda/platform.hpp
Outdated
@@ -9,7 +9,8 @@ | |||
//===----------------------------------------------------------------------===// | |||
#pragma once | |||
|
|||
#include <ur/ur.hpp> | |||
#include <memory> | |||
#include <ur_api.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the headers not ordered hierarchically e.g local, 3rd-party, standard-library or similar?
source/adapters/hip/memory.cpp
Outdated
@@ -15,6 +15,7 @@ | |||
|
|||
namespace { | |||
|
|||
#if HIP_VERSION >= 50600000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this belong in a separate patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for level zero
d867d48
to
800bf88
Compare
Unified Runtime -> intel/llvm Repo Move NoticeInformationThe source code of Unified Runtime has been moved to intel/llvm under the unified-runtime top-level directory, 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 has been updated with new instructions for contributing to Unified Runtime. PR MigrationAll open PRs including this one will be labelled auto-close 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. This is an automated comment. |
Unified Runtime -> intel/llvm Repo Move NoticeFollowing on from the previous notice, we have now enabled workflows to automatically label and close PRs because the Unified Runtime source code has moved to intel/llvm. This PR has now been marked with the Please review the previous notice for more information, including assistance with migrating your PR to intel/llvm. Should there be a reason for this PR to remain open, manually remove the This is an automated comment. |
Automatic PR Closure NoticeInformationThis PR has been closed automatically. It was marked with the All Unified Runtime development should be done in intel/llvm, details can be found in the updated contribution guide. Next StepsShould you wish to re-open this PR it must be moved to intel/llvm. We have provided a script to help automate this process, otherwise no actions are required. This is an automated comment. |
ur.cpp
andur.hpp
to theur_common
static library.ur.hpp
tour_util.hpp
GetHipFormatPixelSize
on HIP < 5.6 as this came up when I was testing locally