summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/gaudi/gaudiP.h
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2020-06-02 12:28:27 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-07-24 20:31:34 +0300
commitc16d45f42b64e91895f4bc1cf19febeb5e0c52b6 (patch)
tree0e248646613ecbb8fa69681dfc7d835c59dfcb6d /drivers/misc/habanalabs/gaudi/gaudiP.h
parent0b168c8f1d21f87003fb28b4c87c32335d7fc94b (diff)
downloadlinux-c16d45f42b64e91895f4bc1cf19febeb5e0c52b6.tar.bz2
habanalabs: Use pending CS amount per ASIC
Training schemes requires much more concurrent command submissions than inference does. In addition, training command submissions can be completed in a non serialized manner. Hence, we add support in which each ASIC will be able to configure the amount of concurrent pending command submissions, rather than use a predefined amount. This change will enhance performance by allowing the user to add more concurrent work without waiting for the previous work to be completed. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/gaudi/gaudiP.h')
-rw-r--r--drivers/misc/habanalabs/gaudi/gaudiP.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudiP.h b/drivers/misc/habanalabs/gaudi/gaudiP.h
index 41a8d9bff6bf..63baef1e4e99 100644
--- a/drivers/misc/habanalabs/gaudi/gaudiP.h
+++ b/drivers/misc/habanalabs/gaudi/gaudiP.h
@@ -57,6 +57,12 @@
#define GAUDI_DEFAULT_CARD_NAME "HL2000"
+#define GAUDI_MAX_PENDING_CS 1024
+
+#if !IS_MAX_PENDING_CS_VALID(GAUDI_MAX_PENDING_CS)
+#error "GAUDI_MAX_PENDING_CS must be power of 2 and greater than 1"
+#endif
+
#define PCI_DMA_NUMBER_OF_CHNLS 3
#define HBM_DMA_NUMBER_OF_CHNLS 5
#define DMA_NUMBER_OF_CHNLS (PCI_DMA_NUMBER_OF_CHNLS + \