History

habanalabs: allow user to pass a staged submission seq

In order to support the staged submission feature, user must be allowed to use the same CS sequence for all submissions in the same staged submission.

Ofir Bitton committed 5 years ago

Commit c209e741 parent ac6fdbf2 files · +30 −14Browse files

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

Unified · Split

include/uapi/misc/habanalabs.h+19−9
@@ -604,11 +604,14 @@ struct hl_cs_chunk { · 603 unmodified lines
604604 };
605605
606606 /* SIGNAL and WAIT/COLLECTIVE_WAIT flags are mutually exclusive */
607−#define HL_CS_FLAGS_FORCE_RESTORE 0x1
608−#define HL_CS_FLAGS_SIGNAL 0x2
609−#define HL_CS_FLAGS_WAIT 0x4
610−#define HL_CS_FLAGS_COLLECTIVE_WAIT 0x8
611−#define HL_CS_FLAGS_TIMESTAMP 0x20
607+#define HL_CS_FLAGS_FORCE_RESTORE 0x1
608+#define HL_CS_FLAGS_SIGNAL 0x2
609+#define HL_CS_FLAGS_WAIT 0x4
610+#define HL_CS_FLAGS_COLLECTIVE_WAIT 0x8
611+#define HL_CS_FLAGS_TIMESTAMP 0x20
612+#define HL_CS_FLAGS_STAGED_SUBMISSION 0x40
613+#define HL_CS_FLAGS_STAGED_SUBMISSION_FIRST 0x80
614+#define HL_CS_FLAGS_STAGED_SUBMISSION_LAST 0x100
612615
613616 #define HL_CS_STATUS_SUCCESS 0
614617
@@ -622,10 +625,17 @@ struct hl_cs_in { · 7 unmodified lines
622625 /* holds address of array of hl_cs_chunk for execution phase */
623626 __u64 chunks_execute;
624627
625− /* this holds address of array of hl_cs_chunk for store phase -
626− * Currently not in use
627− */
628− __u64 chunks_store;
628+ union {
629+ /* this holds address of array of hl_cs_chunk for store phase -
630+ * Currently not in use
631+ */
632+ __u64 chunks_store;
633+
634+ /* Sequence number of a staged submission CS
635+ * valid only if HL_CS_FLAGS_STAGED_SUBMISSION is set
636+ */
637+ __u64 seq;
638+ };
629639
630640 /* Number of chunks in restore phase array. Maximum number is
631641 * HL_MAX_JOBS_PER_CS