Repository navigation
Conversation
alexfikl
commented
Oct 2, 2026
Comment on lines
+187
to
+190
| target_include_directories(_cl SYSTEM PRIVATE | ||
| ${CL_INC_DIR} | ||
| ${NANOBIND_INCLUDE_DIR} | ||
| ${Python_NumPy_INCLUDE_DIRS}) |
Contributor
Author
There was a problem hiding this comment.
This is mainly needed so that gcc/clang don't complain about warnings in these headers. I think NB_SUPRESS_WARNINGS already does most of this, but added it with CL and NumPy just in case.
alexfikl
commented
Oct 2, 2026
Comment on lines
+198
to
+217
| if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") | ||
| target_compile_options(_cl PRIVATE | ||
| -Wall | ||
| -Wextra | ||
| # NOTE: VLAs are used by PYOPENCL_STACK_CONTAINER for dubious reasons | ||
| -Wpedantic -Wno-vla | ||
| -Wshadow | ||
| -Wold-style-cast | ||
| -Wcast-align | ||
| -Wconversion -Wsign-conversion | ||
| -Wnon-virtual-dtor | ||
| -Woverloaded-virtual | ||
| -Wformat=2 | ||
| -Wimplicit-fallthrough | ||
| -Wdouble-promotion | ||
| -Wnull-dereference | ||
| # NOTE: mostly calls to deprecated CL functions that we support | ||
| -Wno-deprecated-declarations | ||
| ) | ||
| endif() |
Contributor
Author
There was a problem hiding this comment.
Loads of random warnings here. The -Wconversion ones are a bit noisy, but overall they should be ok?
alexfikl
commented
Oct 2, 2026
Comment on lines
+202
to
+203
| # NOTE: VLAs are used by PYOPENCL_STACK_CONTAINER for dubious reasons | ||
| -Wpedantic -Wno-vla |
Contributor
Author
There was a problem hiding this comment.
That VLA in there is pretty old. Still useful? Even the Linux kernel removed VLAs 😁
alexfikl
commented
Oct 2, 2026
| { \ | ||
| PYOPENCL_PRINT_CALL_TRACE_INFO(#NAME, TRACE_INFO); \ | ||
| cl_int status_code; \ | ||
| cl_int _cl_status_code; \ |
Contributor
Author
There was a problem hiding this comment.
Some of these were shadowing, but most of them were not. I added a _cl_ prefix to everybody just for consistency.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.