-
Notifications
You must be signed in to change notification settings - Fork 124
Werror fixes #1206
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
Werror fixes #1206
Conversation
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/HIP 👍
source/adapters/hip/memory.hpp
Outdated
@@ -502,3 +502,22 @@ struct ur_mem_handle_t_ { | |||
} | |||
} | |||
}; | |||
|
|||
constexpr size_t imageElementByteSize(hipArray_Format ArrayFormat) { |
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 need to be a fee floating function? Maybe we could hide it in the cpp file behind an anonymous namespace?
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.
This function is used by two separate .cpp
files, and used to be defined 3 times (with different names) in those two files, so I figured it'd be better to have a single definition. If that's not ideal because the function is now available in the entire adapter, what would be the preffered approach? Have two separate definitions of the function in anonymous namespace, or maybe a function that's defined in one .cpp
file and extern
ed in another?
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.
My bad, I only checked the diffs and it looked like it was only used in memory.cpp
. I'd vote for one def + extern
.
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.
Single def + extern in latest version
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1206 +/- ##
==========================================
- Coverage 15.73% 15.73% -0.01%
==========================================
Files 223 223
Lines 31478 31477 -1
Branches 3558 3558
==========================================
- Hits 4954 4953 -1
Misses 26473 26473
Partials 51 51 ☔ View full report in Codecov by Sentry. |
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
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.
Our CI workflows use UR_DEVELOPER_MODE=ON
, enforcing -Werror
. Are you using a different compiler? Or are these issue related to configurations we don't build (e.g., non-L0 adapters on windows)?
If it's the latter, it might be useful to create an issue to add these missing configurations so that the build doesn't get broken again.
A bunch of fixes to get `-Werror` builds to pass, both on Linux and on Windows (`/WX`) * Disable verbose Windows warnings * `_CRT_SECURE_NO_WARNINGS` because of `std::getenv` * C4267 because of conversions from `size_t` to other integers * Define `WIN32_LEAN_AND_MEAN` and `NOMINMAX` on Windows * Gets rid of some errors and speeds up the build * Convert integer CUDA objects to std::uintptr_t before reinterpreting them to a pointer * Fixed "unused function" warning for `GetHipFormatPixelSize` * There was a lot of duplication, now a single function called `imageElementByteSize` * Mark some variables as potentially unused (only used in asserts) * Other minor fixes
On Linux I built this with |
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.
Bindless images LGTM
On Linux, we are missing a Native CPU build. On Windows, we are missing CUDA, HIP, OpenCL and Native CPU. |
The HIP adapter is not supported on Windows currently, so doubt we need to add testing for it just now. We already have #1069 for native cpu testing on Linux. |
Friendly ping for @oneapi-src/unified-runtime-level-zero-write |
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.
Good for the level zero side.
Werror fixes
A bunch of fixes to get
-Werror
builds to pass,both on Linux and on Windows (
/WX
)_CRT_SECURE_NO_WARNINGS
because ofstd::getenv
size_t
to other integersWIN32_LEAN_AND_MEAN
andNOMINMAX
on Windowsstd::uintptr_t
before reinterpreting them to a pointer
GetHipFormatPixelSize
called
imageElementByteSize