Skip to content

Remove min-time/max-noise API. - #223

Merged
alliepiper merged 1 commit into
NVIDIA:mainfrom
alliepiper:stopping_param_cleanup
May 8, 2025
Merged

Remove min-time/max-noise API.#223
alliepiper merged 1 commit into
NVIDIA:mainfrom
alliepiper:stopping_param_cleanup

Conversation

@alliepiper

@alliepiper alliepiper commented May 8, 2025

Copy link
Copy Markdown
Contributor

These are now owned by the stdrel stopping criterion, and should not be exposed directly in the benchmark/state/etc APIs.

There's a small chance this may affect users that are calling NVBENCH_BENCH(...).set_min_time(...) or NVBENCH_BENCH(...).set_max_noise(...).
These can be updated to NVBENCH_BENCH(...).set_criterion_param_float64(["min-time"|"max-noise"], ...).

These are now owned by the stdrel stopping criterion, and should not be exposed directly in the benchmark/state/etc APIs.

There's a small chance this may affect users that are calling `NVBENCH_BENCH(...).set_min_time(...)` or NVBENCH_BENCH(...).set_max_noise(...)`.
These can be updated to `NVBENCH_BENCH(...).set_criterion_param_float64(["min-time"|"max-noise"], ....)`.
@alliepiper alliepiper added the release: breaking change Include in "Breaking Changes" section of release notes. label May 8, 2025
@alliepiper
alliepiper merged commit f44f5cc into NVIDIA:main May 8, 2025
PointKernel added a commit to NVIDIA/cuCollections that referenced this pull request May 8, 2025
This PR updates CMake to fetch the nvbench version specified in
`rapids-cmake` instead of always pulling the latest commit from the
nvbench `main` branch. This avoids the recent breaking change introduced
in NVIDIA/nvbench#223.
@ahendriksen

Copy link
Copy Markdown
Contributor
image

Sorry for being that guy.. I was using the state based API to set the minimum duration of the benchmark to get accurate power measurements.

I could pass the minimum number of seconds using a benchmark parameter:

  double num_seconds = state.get_float64("num_seconds"); //
[...]
  // Ensure the benchmark runs for num_seconds
  state.set_timeout(num_seconds);
  state.set_min_time(num_seconds);
[..]
}

NVBENCH_BENCH_TYPES(energy, NVBENCH_TYPE_AXES(types, ops, inits))
  .set_name("energy")
  .add_float64_axis("num_seconds", {5.})

Can I still do this somehow using the new API? I would like to set the timeout inside the benchmark function, not on the NV_BENCH definition, as I want to be able to modify it.

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

Labels

release: breaking change Include in "Breaking Changes" section of release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants