-
Notifications
You must be signed in to change notification settings - Fork 116
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
base: main
Are you sure you want to change the base?
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
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