Skip to content

pynvbench: Need to repeatedly Ctrl-C to stop pynvbench script #284

@shwina

Description

@shwina

When running a pynvbench script with multiple benchmarks, if I hit Ctrl-C, it terminates the current benchmark and moves on to the next benchmark (instead of terminating execution altogether).

This looks like:

Run:  [17/20] benchmark_name [Device=1 dtype=float32 Timesteps=2^24]
^CFail: Unexpected error: KeyboardInterrupt: <EMPTY MESSAGE>

At:
  /path/to/benchmark_script.py(399): benchmark_function
  /path/to/benchmark_script.py(427): <module>

Run:  [18/20] benchmark_name [Device=1 dtype=float64 Timesteps=2^24]
^C^CFail: Unexpected error: KeyboardInterrupt: <EMPTY MESSAGE>

At:
  /path/to/benchmark_script.py(399): benchmark_function
  /path/to/benchmark_script.py(427): <module>

Run:  [19/20] benchmark_name [Device=1 dtype=float32 Timesteps=2^28]
^C^C^C^C^C^C^CFail: Unexpected error: KeyboardInterrupt: <EMPTY MESSAGE>

At:
  /path/to/benchmark_script.py(399): benchmark_function
  /path/to/benchmark_script.py(427): <module>

I suspect this is due to a broad catch (C++) or except (Python) statement somewhere that is catching and handling all exceptions, including KeyboardInterrupt - instead of letting the Python interpreter deal with those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions