Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected the logic in the npu preempt data function #8296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkotipal-xilinx
Copy link
Collaborator

Signe-off-by: Durga Prasad [email protected]

Problem solved by the commit

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

How problem was solved, alternative solutions (if any) and why they were rejected

Risks (if any) associated the changes in the commit

What has been tested and how, request additional testing if necessary

Documentation impact (if any)

@@ -1087,7 +1087,7 @@ get_ert_npu_data(struct ert_start_kernel_cmd* pkt)
static inline struct ert_npu_preempt_data*
get_ert_npu_preempt_data(struct ert_start_kernel_cmd* pkt)
{
if (pkt->opcode != ERT_START_NPU)
if (pkt->opcode != ERT_START_NPU_PREEMPT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my humble opinion, this check is not needed at all since this function is an internal function.
In another word, the person who call "get_ert_npu_preempt_data" should ensure that
pkt->opcode == ERT_START_NPU_PREEMPT
is true.

With that being said, we should add
assert(pkt->opcode == ERT_START_NPU_PREEMPT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants