IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

bencher_iter_custom_multicontext

def bencher_iter_custom_multicontext[kernel_launch_fn: def() raises capturing thin -> None](mut self_: Bencher, ctxs: List[DeviceContext])

Times a target GPU function with custom number of iterations via DeviceContext ctx.

Parameters:

  • โ€‹kernel_launch_fn (def() raises capturing thin -> None): The target GPU kernel launch function to benchmark.

Args:

  • โ€‹self_ (Bencher): The bencher state.
  • โ€‹ctxs (List[DeviceContext]): The list of GPU DeviceContext's for launching kernel.