Skip to content

Fix issue: #254 - Fix for negative duration times.#302

Open
tsocha wants to merge 8 commits intofacebookresearch:mainfrom
tsocha:fix-negative-duration
Open

Fix issue: #254 - Fix for negative duration times.#302
tsocha wants to merge 8 commits intofacebookresearch:mainfrom
tsocha:fix-negative-duration

Conversation

@tsocha
Copy link

@tsocha tsocha commented Nov 5, 2025

What does this PR do?

Fixes #254.
This PR replaces all negative values with 0.

Before submitting

Due to rounding timestamps, there were cases where the duration became
negative for very small intervals. This commit fixes that by ensuring
that any negative durations are set to zero after rounding.
It also enables the Frequent CUDA Kernel Patterns analysis which failed
so far.

Signed-off-by: Benedykt Bela <benedykt.bela@intel.com>
Signed-off-by: Benedykt Bela <benedykt.bela@intel.com>
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 5, 2025
@tsocha
Copy link
Author

tsocha commented Nov 24, 2025

@briancoutinho @hjli-creator could you look at this PR?

Signed-off-by: Benedykt Bela <benedykt.bela@intel.com>
Signed-off-by: Benedykt Bela <benedykt.bela@intel.com>
Initial approach was to set all negative values to 0.0.
The more precise approach is to round to zero both positive and
negative values that are smaller than a defined accuracy
which is currently set to 1e-9.

Signed-off-by: Benedykt Bela <benedykt.bela@intel.com>
@ZhaoqiongZ ZhaoqiongZ moved this to Aged Pending Review in PyTorch Intel Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_frequent_cuda_kernel_sequences fails with like "ValueError: Unexpected case: [2123.0, -1.0, 1.0, 357.0] [2122.0, 0.0, 1.0, 357.0]"

2 participants