-
Notifications
You must be signed in to change notification settings - Fork 183
BUILD: Fix UCX GPU device API detection #990
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
base: main
Are you sure you want to change the base?
Changes from 9 commits
f1aefa4
06a8220
1700569
0307756
155898e
9c14b3f
0dc38fc
1e37280
c3fbbae
e190f3c
c6b62ab
db3f9b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,30 +120,27 @@ if cuda_dep.found() | |
| else | ||
| error('Unsupported CUDA version: ' + cuda_version_major) | ||
| endif | ||
|
|
||
| # DOCA GPUNETIO | ||
| nvcc_cmd = find_program('nvcc', required: false) | ||
| if nvcc_cmd.found() | ||
| if nvcc.version().version_compare('>=12.8') and nvcc.version().version_compare('<13.0') | ||
| doca_gpunetio_dep = dependency('doca-gpunetio', required : false) | ||
| else | ||
| warning('CUDA version = ' + nvcc.version() + ', GPUNETIO plugin will be disabled') | ||
| doca_gpunetio_dep = disabler() | ||
| endif | ||
| else | ||
| warning('nvcc not found, GPUNETIO plugin will be disabled') | ||
| doca_gpunetio_dep = disabler() | ||
| endif | ||
| else | ||
| warning('CUDA not found. UCX backend will be built without CUDA support, and some plugins will be disabled.') | ||
| doca_gpunetio_dep = disabler() | ||
| warning('CUDA not found, cannot autodetect wheel dir; defaulting to nixl_cu12') | ||
| cuda_wheel_dir = 'nixl_cu12' | ||
| endif | ||
|
|
||
| # DOCA GPUNETIO | ||
| if cuda_dep.found() | ||
| nvcc_cmd = find_program('nvcc', required: false) | ||
| if nvcc_cmd.found() | ||
| if nvcc_cmd.version().version_compare('>=12.8') and nvcc_cmd.version().version_compare('<13.0') | ||
| doca_gpunetio_dep = dependency('doca-gpunetio', required : false) | ||
| else | ||
| warning('CUDA version = ' + nvcc_cmd.version() + ', GPUNETIO plugin will be disabled') | ||
| doca_gpunetio_dep = disabler() | ||
| endif | ||
| else | ||
| warning('nvcc not found, GPUNETIO plugin will be disabled') | ||
| warning('CUDA not found, GPUNETIO plugin will be disabled') | ||
| doca_gpunetio_dep = disabler() | ||
| endif | ||
| else | ||
| warning('CUDA not found, GPUNETIO plugin will be disabled') | ||
| doca_gpunetio_dep = disabler() | ||
| endif | ||
|
|
||
| # Check for etcd-cpp-api - use multiple methods for discovery | ||
|
|
@@ -213,10 +210,11 @@ nvcc_prog = find_program('nvcc', required: false) | |
| ucx_gpu_device_api_available = false | ||
| if ucx_dep.found() and cuda_dep.found() and nvcc_prog.found() | ||
| cuda = meson.get_compiler('cuda') | ||
| # TODO: Expose doca_gpunetio_dep through UCX | ||
| have_gpu_side = cuda.compiles(''' | ||
| #include <ucp/api/device/ucp_device_impl.h> | ||
| int main() { return 0; } | ||
| ''', dependencies : ucx_dep, args: nvcc_flags) | ||
| ''', dependencies : [ucx_dep, doca_gpunetio_dep], args: nvcc_flags) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's add "TODO: expose gpunetIo dependency through ucx"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added TODO |
||
|
|
||
| have_host_side = cpp.compiles(''' | ||
| #include <ucp/api/device/ucp_host.h> | ||
|
|
@@ -233,6 +231,7 @@ if ucx_dep.found() and cuda_dep.found() and nvcc_prog.found() | |
| 'GPU-side compile' : have_gpu_side, | ||
| 'Host-side compile' : have_host_side, | ||
| 'nvcc available' : nvcc_prog.found(), | ||
| 'DOCA GPUNETIO found': doca_gpunetio_dep.found(), | ||
| }, section: 'UCX GPU Device API', bool_yn: true) | ||
| endif | ||
|
|
||
|
|
||
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.
why do we still need it?
on line 107 we use the same version comparision without nvcc_cmd
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.
removed