Skip to content

UCP/CORE: Support negate mode for device selection environment variables#11167

Merged
brminich merged 24 commits intoopenucx:masterfrom
guy-ealey-morag:devices-env-vars-negate
Feb 23, 2026
Merged

UCP/CORE: Support negate mode for device selection environment variables#11167
brminich merged 24 commits intoopenucx:masterfrom
guy-ealey-morag:devices-env-vars-negate

Conversation

@guy-ealey-morag
Copy link
Copy Markdown
Contributor

@guy-ealey-morag guy-ealey-morag commented Feb 4, 2026

What?

Changed UCX_*_DEVICES environment variables (NET_DEVICES, SHM_DEVICES, ACC_DEVICES, SELF_DEVICES) from string arrays to allow lists, enabling negate mode with the ^ prefix syntax (e.g., UCX_NET_DEVICES=^mlx5_0).

Why?

Align behavior with other env variables such as UCX_TLS and UCX_PROTOS that already support the negate syntax.

How?

  • Changed device config fields from UCS_CONFIG_TYPE_STRING_ARRAY to UCS_CONFIG_TYPE_ALLOW_LIST
  • Updated ucp_is_resource_in_device_list() to handle ALLOW_ALL and NEGATE modes

@guy-ealey-morag guy-ealey-morag force-pushed the devices-env-vars-negate branch from 698da1c to 1b943b6 Compare February 4, 2026 09:59
Comment thread src/ucp/core/ucp_context.c
Comment thread test/gtest/ucp/test_ucp_context.cc Outdated
Comment thread src/ucp/core/ucp_context.c Outdated
@brminich brminich requested a review from ColinNV February 10, 2026 21:21
Comment thread src/ucp/core/ucp_context.c Outdated
Comment thread test/gtest/ucp/test_ucp_context.cc Outdated
Comment thread test/gtest/ucp/test_ucp_context.cc Outdated
Copy link
Copy Markdown
Contributor

@tvegas1 tvegas1 left a comment

Choose a reason for hiding this comment

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

minor comment

Comment thread src/ucp/core/ucp_context.c Outdated
Comment thread src/ucp/core/ucp_context.c Outdated
Comment thread test/gtest/ucp/test_ucp_context.cc
Comment thread src/ucp/core/ucp_context.c Outdated
tvegas1
tvegas1 previously approved these changes Feb 12, 2026
Comment thread src/ucs/config/parser.c Outdated
Comment thread src/ucp/core/ucp_context.c Outdated
tvegas1
tvegas1 previously approved these changes Feb 16, 2026
brminich
brminich previously approved these changes Feb 16, 2026
Comment thread src/ucs/config/parser.c
Comment thread src/ucp/core/ucp_context.c Outdated
Comment thread src/ucs/config/parser.c
Copy link
Copy Markdown
Contributor

@ColinNV ColinNV left a comment

Choose a reason for hiding this comment

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

FWIW LGTM

@brminich brminich merged commit d7723f2 into openucx:master Feb 23, 2026
152 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants