Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/aws_s3_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
run_aws_s3_tests:
name: Run AWS S3 Tests
environment: SWX_AWS
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
AWS_DEFAULT_REGION: eu-central-1
AWS_ACCESS_KEY_ID: ${{ secrets.NIXL_AWS_ACCESS_KEY_ID }}
Expand Down
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ if cuda_dep.found()
nvcc_flags_link += ['-gencode=arch=compute_80,code=sm_80']
nvcc_flags_link += ['-gencode=arch=compute_90,code=sm_90']
add_project_link_arguments(nvcc_flags_link, language: 'cuda')

if not get_option('enable_cuda_debug')
add_project_arguments('-dopt=on', language: 'cuda')
endif
Comment on lines +104 to +106
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not get_option('enable_cuda_debug')
add_project_arguments('-dopt=on', language: 'cuda')
endif
if get_option('enable_cuda_debug')
add_project_arguments('-G', language: 'cuda')
endif

When -G is not specified, -dopt=on is implicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked here:
https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/ 4.2.3.3
And also compiled with and without add_project_arguments('-dopt=on', language: 'cuda') to verify.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but as @rakhmets mentioned

4.2.3.12. --dopt kind (-dopt)
Enable device code optimization. When specified along with -G, enables limited debug information generation for optimized device code (currently, only line number information). When -G is not specified, -dopt=on is implicit.

So, should we just add -G for debug mode and do not add it for release?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is that -G is added by meson.
So, in debug build it will be -G. But I think the purpose of the PR is:

  • debug build -G -dopt=on
  • debug + cuda debug: -G

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a separate debug option for cuda? I'd just make sure we have -G for debug and we do not have it for release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug is the default build type, and it's not documented anywhere, out of the box users can get very bad performance because of this "-G" flag

else
warning('CUDA not found. UCX backend will be built without CUDA support, and some plugins will be disabled.')
endif
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ option('gds_path', type: 'string', value: '/usr/local/cuda/', description: 'Path
option('cudapath_inc', type: 'string', value: '', description: 'Include path for CUDA')
option('cudapath_lib', type: 'string', value: '', description: 'Library path for CUDA')
option('cudapath_stub', type: 'string', value: '', description: 'Extra Stub path for CUDA')
option('enable_cuda_debug', type: 'boolean', value: false, description: 'Enable CUDA debug mode (disables -dopt=on optimization)')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we tie this to the buildtype (debug/release) instead of adding a new option?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes and maybe we need to build NIXL in release mode by default

option('static_plugins', type: 'string', value: '', description: 'Plugins to be built-in, comma-separated')
option('build_docs', type: 'boolean', value: false, description: 'Build Doxygen documentation')
option('log_level', type: 'combo', choices: ['trace', 'debug', 'info', 'warning', 'error', 'fatal', 'auto'], value: 'auto', description: 'Log Level (auto: auto-detect based on build type: trace for debug builds, info for release builds)')
Expand Down