habanalabs/gaudi: do not set EB in collective slave queues
We don't need to set EB on signal packets from collective slave queues as it degrades performance. Because the slaves are the network queues, the engine barrier doesn't actually guarantee that the packet has been sent. Signed-off-by: Alon Mizrahi <amizrahi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
9c9013cbd8
commit
72ab9ca52d
@ -944,7 +944,7 @@ struct hl_asic_funcs {
|
||||
u32 (*get_signal_cb_size)(struct hl_device *hdev);
|
||||
u32 (*get_wait_cb_size)(struct hl_device *hdev);
|
||||
u32 (*gen_signal_cb)(struct hl_device *hdev, void *data, u16 sob_id,
|
||||
u32 size);
|
||||
u32 size, bool eb);
|
||||
u32 (*gen_wait_cb)(struct hl_device *hdev,
|
||||
struct hl_gen_wait_properties *prop);
|
||||
void (*reset_sob)(struct hl_device *hdev, void *data);
|
||||
|
@ -418,8 +418,11 @@ static void init_signal_cs(struct hl_device *hdev,
|
||||
"generate signal CB, sob_id: %d, sob val: 0x%x, q_idx: %d\n",
|
||||
cs_cmpl->hw_sob->sob_id, cs_cmpl->sob_val, q_idx);
|
||||
|
||||
/* we set an EB since we must make sure all oeprations are done
|
||||
* when sending the signal
|
||||
*/
|
||||
hdev->asic_funcs->gen_signal_cb(hdev, job->patched_cb,
|
||||
cs_cmpl->hw_sob->sob_id, 0);
|
||||
cs_cmpl->hw_sob->sob_id, 0, true);
|
||||
|
||||
kref_get(&hw_sob->kref);
|
||||
|
||||
|
@ -361,7 +361,7 @@ static int gaudi_cpucp_info_get(struct hl_device *hdev);
|
||||
static void gaudi_disable_clock_gating(struct hl_device *hdev);
|
||||
static void gaudi_mmu_prepare(struct hl_device *hdev, u32 asid);
|
||||
static u32 gaudi_gen_signal_cb(struct hl_device *hdev, void *data, u16 sob_id,
|
||||
u32 size);
|
||||
u32 size, bool eb);
|
||||
static u32 gaudi_gen_wait_cb(struct hl_device *hdev,
|
||||
struct hl_gen_wait_properties *prop);
|
||||
|
||||
@ -1064,7 +1064,7 @@ static void gaudi_collective_slave_init_job(struct hl_device *hdev,
|
||||
prop->collective_sob_id, queue_id);
|
||||
|
||||
cb_size += gaudi_gen_signal_cb(hdev, job->user_cb,
|
||||
prop->collective_sob_id, cb_size);
|
||||
prop->collective_sob_id, cb_size, false);
|
||||
}
|
||||
|
||||
static void gaudi_collective_wait_init_cs(struct hl_cs *cs)
|
||||
@ -7893,7 +7893,7 @@ static u32 gaudi_get_wait_cb_size(struct hl_device *hdev)
|
||||
}
|
||||
|
||||
static u32 gaudi_gen_signal_cb(struct hl_device *hdev, void *data, u16 sob_id,
|
||||
u32 size)
|
||||
u32 size, bool eb)
|
||||
{
|
||||
struct hl_cb *cb = (struct hl_cb *) data;
|
||||
struct packet_msg_short *pkt;
|
||||
@ -7910,7 +7910,7 @@ static u32 gaudi_gen_signal_cb(struct hl_device *hdev, void *data, u16 sob_id,
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_OP_MASK, 0); /* write the value */
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_BASE_MASK, 3); /* W_S SOB base */
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_OPCODE_MASK, PACKET_MSG_SHORT);
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_EB_MASK, 1);
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_EB_MASK, eb);
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_RB_MASK, 1);
|
||||
ctl |= FIELD_PREP(GAUDI_PKT_SHORT_CTL_MB_MASK, 1);
|
||||
|
||||
|
@ -5339,7 +5339,7 @@ static u32 goya_get_wait_cb_size(struct hl_device *hdev)
|
||||
}
|
||||
|
||||
static u32 goya_gen_signal_cb(struct hl_device *hdev, void *data, u16 sob_id,
|
||||
u32 size)
|
||||
u32 size, bool eb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user