Define new API for collective wait support and modify sync stream common flow. In addition add kernel CB allocation support for internal queues.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -523,7 +523,8 @@ struct hl_cs_chunk { · 522 unmodified lines | |||
| 523 | */ | 523 | */ |
| 524 | __u64 cb_handle; | 524 | __u64 cb_handle; |
| 525 | 525 | ||
| 526 | /* Relevant only when HL_CS_FLAGS_WAIT is set. | 526 | /* Relevant only when HL_CS_FLAGS_WAIT or |
| 527 | * HL_CS_FLAGS_COLLECTIVE_WAIT is set. | ||
| 527 | * This holds address of array of u64 values that contain | 528 | * This holds address of array of u64 values that contain |
| 528 | * signal CS sequence numbers. The wait described by this job | 529 | * signal CS sequence numbers. The wait described by this job |
| 529 | * will listen on all those signals (wait event per signal) | 530 | * will listen on all those signals (wait event per signal) |
| @@ -541,7 +542,8 @@ struct hl_cs_chunk { · 11 unmodified lines | |||
| 541 | */ | 542 | */ |
| 542 | __u32 cb_size; | 543 | __u32 cb_size; |
| 543 | 544 | ||
| 544 | /* Relevant only when HL_CS_FLAGS_WAIT is set. | 545 | /* Relevant only when HL_CS_FLAGS_WAIT or |
| 546 | * HL_CS_FLAGS_COLLECTIVE_WAIT is set. | ||
| 545 | * Number of entries in signal_seq_arr | 547 | * Number of entries in signal_seq_arr |
| 546 | */ | 548 | */ |
| 547 | __u32 num_signal_seq_arr; | 549 | __u32 num_signal_seq_arr; |
| @@ -550,14 +552,21 @@ struct hl_cs_chunk { · 2 unmodified lines | |||
| 550 | /* HL_CS_CHUNK_FLAGS_* */ | 552 | /* HL_CS_CHUNK_FLAGS_* */ |
| 551 | __u32 cs_chunk_flags; | 553 | __u32 cs_chunk_flags; |
| 552 | 554 | ||
| 555 | /* Relevant only when HL_CS_FLAGS_COLLECTIVE_WAIT is set. | ||
| 556 | * This holds the collective engine ID. The wait described by this job | ||
| 557 | * will sync with this engine and with all NICs before completion. | ||
| 558 | */ | ||
| 559 | __u32 collective_engine_id; | ||
| 560 | |||
| 553 | /* Align structure to 64 bytes */ | 561 | /* Align structure to 64 bytes */ |
| 554 | __u32 pad[11]; | 562 | __u32 pad[10]; |
| 555 | }; | 563 | }; |
| 556 | 564 | ||
| 557 | /* SIGNAL and WAIT flags are mutually exclusive */ | 565 | /* SIGNAL and WAIT/COLLECTIVE_WAIT flags are mutually exclusive */ |
| 558 | #define HL_CS_FLAGS_FORCE_RESTORE 0x1 | 566 | #define HL_CS_FLAGS_FORCE_RESTORE 0x1 |
| 559 | #define HL_CS_FLAGS_SIGNAL 0x2 | 567 | #define HL_CS_FLAGS_SIGNAL 0x2 |
| 560 | #define HL_CS_FLAGS_WAIT 0x4 | 568 | #define HL_CS_FLAGS_WAIT 0x4 |
| 569 | #define HL_CS_FLAGS_COLLECTIVE_WAIT 0x8 | ||
| 561 | 570 | ||
| 562 | #define HL_CS_STATUS_SUCCESS 0 | 571 | #define HL_CS_STATUS_SUCCESS 0 |
| 563 | 572 | ||