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
523523 */
524524 __u64 cb_handle;
525525
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.
527528 * This holds address of array of u64 values that contain
528529 * signal CS sequence numbers. The wait described by this job
529530 * will listen on all those signals (wait event per signal)
@@ -541,7 +542,8 @@ struct hl_cs_chunk { · 11 unmodified lines
541542 */
542543 __u32 cb_size;
543544
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.
545547 * Number of entries in signal_seq_arr
546548 */
547549 __u32 num_signal_seq_arr;
@@ -550,14 +552,21 @@ struct hl_cs_chunk { · 2 unmodified lines
550552 /* HL_CS_CHUNK_FLAGS_* */
551553 __u32 cs_chunk_flags;
552554
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+
553561 /* Align structure to 64 bytes */
554− __u32 pad[11];
562+ __u32 pad[10];
555563 };
556564
557−/* SIGNAL and WAIT flags are mutually exclusive */
565+/* SIGNAL and WAIT/COLLECTIVE_WAIT flags are mutually exclusive */
558566 #define HL_CS_FLAGS_FORCE_RESTORE 0x1
559567 #define HL_CS_FLAGS_SIGNAL 0x2
560568 #define HL_CS_FLAGS_WAIT 0x4
569+#define HL_CS_FLAGS_COLLECTIVE_WAIT 0x8
561570
562571 #define HL_CS_STATUS_SUCCESS 0
563572

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