Skip to content

TL Iface [Do not merge]#4

Closed
vspetrov wants to merge 11 commits intoopenucx:masterfrom
vspetrov:tl_iface
Closed

TL Iface [Do not merge]#4
vspetrov wants to merge 11 commits intoopenucx:masterfrom
vspetrov:tl_iface

Conversation

@vspetrov
Copy link
Copy Markdown
Collaborator

Adds minimal functional example implementation of the UCC component architecture. (currently the API prefix is "TL" which stands for "Team Library").

  1. Build: ./autogen.sh; mkdir build_dbg; cd build_dbg; ../configure --prefix=pwd/install --with-ucx=$UCX_DIR; make -j install
  2. Build tests: make -C test (in order to build test test_team_create MPI headers and libs should be available in PATH)

run tests:

[valentinp@hpchead]> UCC_LOG_LEVEL=info ./test/test_context_create
[1600942567.985045] [hpchead:31168:0] ucc_constructor.c:133  UCC  INFO  UCC team lib path: /labhome/valentinp/workspace/ucc/build_dbg/install/lib/ucc
[1600942567.986756] [hpchead:31168:0]        ucc_lib.c:106  UCC  INFO  lib_prefix "TEST_UCC_": initialized tl "basic" priority 10
[1600942567.986769] [hpchead:31168:0]        ucc_lib.c:106  UCC  INFO  lib_prefix "TEST_UCC_": initialized tl "debug" priority 1
[1600942567.986781] [hpchead:31168:0] ucc_basic_context.c:22   TL_BASIC INFO  Created tl context 0x604510
[1600942567.986786] [hpchead:31168:0] ucc_basic_context.c:34   TL_BASIC INFO  Destroying tl context 0x604510
[valentinp@hpchead]> mpirun -x UCC_TLS=basic -x UCC_TL_BASIC_PRIORITY=30 -x UCC_TL_BASIC_LOG_LEVEL=info  -np 2 -H localhost:2 ./test/test_team_create
[1600942914.711138] [hpchead:965  :0] ucc_basic_context.c:22   TL_BASIC INFO  Created tl context 0x12d4a60
[1600942914.711170] [hpchead:965  :0] ucc_basic_team.c:20   TL_BASIC INFO  create_post tl team 0x12d49c0
[1600942914.711175] [hpchead:965  :0] ucc_basic_team.c:30   TL_BASIC INFO  tl team 0x12d49c0 create complete
[1600942914.711180] [hpchead:965  :0] ucc_basic_context.c:34   TL_BASIC INFO  Destroying tl context 0x12d4a60
[1600942914.711138] [hpchead:966  :0] ucc_basic_context.c:22   TL_BASIC INFO  Created tl context 0x12d4b80
[1600942914.711170] [hpchead:966  :0] ucc_basic_team.c:20   TL_BASIC INFO  create_post tl team 0x12d4ae0
[1600942914.711175] [hpchead:966  :0] ucc_basic_team.c:30   TL_BASIC INFO  tl team 0x12d4ae0 create complete
[1600942914.711180] [hpchead:966  :0] ucc_basic_context.c:34   TL_BASIC INFO  Destroying tl context 0x12d4b80

component_install = ucc_team_lib_basic.la

ucc_team_lib_basic_la_SOURCES =$(sources)
ucc_team_lib_basic_la_CPPFLAGS = $(AM_CPPFLAGS) $(VMC_CPPFLAGS)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

vmc?

component_install = ucc_team_lib_debug.la

ucc_team_lib_debug_la_SOURCES =$(sources)
ucc_team_lib_debug_la_CPPFLAGS = $(AM_CPPFLAGS) $(VMC_CPPFLAGS)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also here and next line

@vspetrov vspetrov closed this Feb 3, 2021
@vspetrov vspetrov deleted the tl_iface branch February 10, 2021 19:58
shimmybalsam pushed a commit to shimmybalsam/ucc that referenced this pull request May 1, 2022
QiaoK added a commit to QiaoK/ucc that referenced this pull request Feb 2, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.

Co-authored-by: Cursor <cursoragent@cursor.com>
QiaoK added a commit to QiaoK/ucc that referenced this pull request Mar 5, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.

Co-authored-by: Cursor <cursoragent@cursor.com>
QiaoK added a commit to QiaoK/ucc that referenced this pull request Mar 25, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
QiaoK added a commit to QiaoK/ucc that referenced this pull request Mar 25, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
janjust pushed a commit to QiaoK/ucc that referenced this pull request Apr 1, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
QiaoK added a commit to QiaoK/ucc that referenced this pull request Apr 6, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
QiaoK added a commit to QiaoK/ucc that referenced this pull request Apr 6, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
janjust pushed a commit to QiaoK/ucc that referenced this pull request Apr 7, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
QiaoK added a commit to QiaoK/ucc that referenced this pull request Apr 7, 2026
Move all datatype validation logic from ucc_coll.c to ucc_service_coll.c
to avoid increasing ucc_coll_task_t size.

Key changes:

1. Remove dt_check field from ucc_coll_task_t
   - Saves 8 bytes per task (pointer eliminated)
   - dt_check only exists when validation is needed

2. Create ucc_dt_check_schedule_t extending ucc_schedule_t
   - Embeds ucc_dt_check_state_t directly in schedule
   - Only allocated when validation is required
   - No overhead for tasks without validation

3. Add ucc_service_dt_check() API in ucc_service_coll.h
   - Single entry point for datatype validation
   - Creates validation schedule if needed
   - Returns original task if validation not needed
   - Encapsulates all validation complexity

4. Move all validation functions to ucc_service_coll.c (~480 lines)
   - ucc_dt_check_allreduce_post/progress/finalize
   - ucc_dt_check_actual_wrapper_post/progress/finalize
   - ucc_dt_check_schedule_finalize
   - ucc_service_dt_check (main entry point)
   - Helper macros to access dt_check from schedule

5. Update ucc_coll.c to use new API
   - Replace ucc_dt_check_start_validation + ucc_dt_check_create_schedule
   - Single call to ucc_service_dt_check()
   - Remove ~500 lines of validation code

Benefits:
- Reduced memory footprint: no dt_check pointer in every task
- Better code organization: validation logic in service_coll module
- Cleaner API: single function instead of two-step process
- No performance impact: same validation mechanism

Addresses PR review comment openucx#4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants