History

habanalabs: sync stream collective infrastructure

Define new API for collective wait support and modify sync stream common flow. In addition add kernel CB allocation support for internal queues.

Ofir Bitton committed 6 years ago

Commit 5fe1c171 parent 4bb1f2f6 files · +176 −22Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/misc/habanalabs.h+13−4
@@ -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 contain528 * This holds address of array of u64 values that contain
528 * signal CS sequence numbers. The wait described by this job529 * 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_arr547 * 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 0x1566#define HL_CS_FLAGS_FORCE_RESTORE 0x1
559#define HL_CS_FLAGS_SIGNAL 0x2567#define HL_CS_FLAGS_SIGNAL 0x2
560#define HL_CS_FLAGS_WAIT 0x4568#define HL_CS_FLAGS_WAIT 0x4
569#define HL_CS_FLAGS_COLLECTIVE_WAIT 0x8
561 570
562#define HL_CS_STATUS_SUCCESS 0571#define HL_CS_STATUS_SUCCESS 0
563 572

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t