Skip to content

Conversation

@alephpiece
Copy link

Description

The original code uses integer division in the time calculation: (end_tv.tv_usec) / 1000. Since an empty kernel launch overhead is typically very small (often less than 1ms), this integer division truncates the microsecond component to 0, leading to significant precision loss and incorrect results.

image

Major Revision

  • Changed the divisor from 1000 to 1000. (floating-point literal). This forces floating-point arithmetic, preserving the microsecond precision required for accurate overhead measurement.

@alephpiece alephpiece requested a review from a team as a code owner January 16, 2026 02:21
@guoshzhao guoshzhao self-assigned this Jan 21, 2026
@guoshzhao guoshzhao requested review from guoshzhao and polarG January 21, 2026 04:49
@guoshzhao guoshzhao added bug Something isn't working benchmarks SuperBench Benchmarks micro-benchmarks Micro Benchmark Test for SuperBench Benchmarks labels Jan 21, 2026
@guoshzhao
Copy link
Contributor

Thanks @alephpiece for pointing out this issue. We will verify and review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarks SuperBench Benchmarks bug Something isn't working micro-benchmarks Micro Benchmark Test for SuperBench Benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants