-
Notifications
You must be signed in to change notification settings - Fork 58
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
No-CUDA build #373
No-CUDA build #373
Conversation
Not working for me yet on my Mac - ` × Building wheel for kvikio (pyproject.toml) did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. I think the scikit-build-core may be a red herring (since it's installed in my conda environment), and it's more likely that the missing nvcc is actually the problem. |
Try |
MacOS doesn't have O_DIRECT, so I commented out this line in cpp/include/kvikio/file_handle.hpp: // if (o_direct) { file_flags |= O_DIRECT; } After that, ./build.sh libkvikio worked :-) |
Testing w/legate.io now |
5312e15
to
11eb68b
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.
Looks fine to me.
@@ -15,8 +15,7 @@ | |||
*/ | |||
#pragma once | |||
|
|||
#include <cuda.h> | |||
|
|||
#include <kvikio/shim/cuda_h_wrapper.hpp> |
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.
suggestion/nit: Shall we call this kvikio/shim/cuda_h.hpp
? Or maybe shim/cuda.hpp
?
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.
We already have kvikio/shim/cuda.hpp
and kvikio/shim/cufile.hpp
.
Should we rename the wrappers to:
kvikio/shim/cuda_h.hpp
kvikio/shim/cufile_h.hpp
Or maybe
kvikio/shim/cuda_stub.hpp
kvikio/shim/cufile_stub.hpp
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.
I think I prefer XXX_stub.hpp
over XXX_h.hpp
. Though neither of them are fully satisfactory. I guess my only quibble with wrapper
is that it suggests something that the header file is not doing: in the case where the real header is available, it just #include
s that and no more.
@qkoziol, could you please open a separate issue for this so we don't lose track. |
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.
I almost remarked on the change to update-version.sh
to point out rapidsai/build-planning#15, but then I realized it was an example project, which is one of the few exceptions to the "no-hard-coding-of-RAPIDS-version" rule.
CMake changes approved.
Yes, will do |
@madsbk - One more change was necessary to get the CPU-only build of legate.io working: diff --git a/cpp/include/kvikio/shim/cufile_h_wrapper.hpp b/cpp/include/kvikio/shim/cufile_h_wrapper.hpp
index 72131de..d73f04b 100644
--- a/cpp/include/kvikio/shim/cufile_h_wrapper.hpp
+++ b/cpp/include/kvikio/shim/cufile_h_wrapper.hpp
@@ -58,8 +58,7 @@ struct CUfileDescr_t {
} handle;
};
-const char* cufileop_status_error(...) { return "KvikIO not compiled with cuFile.h"; };
-static inline const char* cufileop_status_error(CUfileOpError err) { return CUFILE_ERRSTR(err); };
+static const char* cufileop_status_error(...) { return "KvikIO not compiled with cuFile.h"; };
CUfileError_t cuFileHandleRegister(...);
CUfileError_t cuFileHandleDeregister(...);
ssize_t cuFileRead(...); |
…o no-cuda-with-wapper
I am surprised that this is needed, what error did you get? |
@KyleFromNVIDIA do we need to add if(CUDAToolkit_FOUND)
target_link_libraries(kvikio INTERFACE CUDA::toolkit)
target_compile_definitions(kvikio INTERFACE KVIKIO_CUDA_FOUND)
else()
message(WARNING "Building KvikIO without CUDA")
endif() to the |
@madsbk That's how I would do it, yes. |
/merge |
Support an environment where CUDA isn't available. Only
pread()
andpwrite()
is available in this configuration.cc. @qkoziol