Nsight Systems

class tests.tools.nsys.test_nsys.TestCacherView on GitHub

Bases: object

Tests for reprospect.tools.nsys.cacher.Cacher.

GRAPH: Final[Path] = PosixPath('tests/assets/tests_assets_graph')
SAXPY: Final[Path] = PosixPath('tests/assets/tests_assets_saxpy')
test_cache_hit(bindir, workdir) NoneView on GitHub

The cacher should hit on the second call.

test_hash_different(bindir) NoneView on GitHub

Test reprospect.tools.ncu.cacher.Cacher.hash().

test_hash_same(bindir) NoneView on GitHub

Test reprospect.tools.nsys.cacher.Cacher.hash().

class tests.tools.nsys.test_nsys.TestCommandView on GitHub

Bases: object

Tests for reprospect.tools.nsys.session.Command.

test_env(bindir: Path) NoneView on GitHub

Check that the environment is handled properly.

class tests.tools.nsys.test_nsys.TestReportView on GitHub

Bases: object

Test reprospect.tools.nsys.report.Report.

class TestReportNvtxEventsView on GitHub

Bases: object

Tests for reprospect.tools.nsys.report.ReportNvtxEvents.

test_get(report) NoneView on GitHub

Test reprospect.tools.nsys.report.ReportNvtxEvents.get().

test_intricate(workdir) NoneView on GitHub

Use tests.assets.nvtx_annotations.TestNVTX.intricate to check that we can build the hierarchy of NVTX events for arbitrarily complicated situations.

test_string_representation(report) NoneView on GitHub

Test the string representation of reprospect.tools.nsys.report.ReportNvtxEvents().

pytestmark = [Mark(name='skipif', args=(False,), kwargs={'reason': 'needs a GPU'})]
report(bindir, workdir: Path) ReportView on GitHub
test_get_events_within_nested_nvtx_ranges(report) NoneView on GitHub

Check that we can retrieve from a table events that happen in a nested NVTX range.

class tests.tools.nsys.test_nsys.TestSessionView on GitHub

Bases: object

Test reprospect.tools.nsys.session.Session.

EXECUTABLE: Final[Path] = PosixPath('tests/assets/tests_assets_saxpy')
pytestmark = [Mark(name='skipif', args=(False,), kwargs={'reason': 'needs a GPU'})]
run(bindir: Path, cwd: Path, nvtx_capture: str | None = None) SessionView on GitHub
test_cuda_api_trace(bindir, workdir) NoneView on GitHub

Collect all CUDA API calls of tests/assets/saxpy.cpp.

test_report(bindir, workdir) NoneView on GitHub

Process the nsys report with reprospect.tools.nsys.report.Report.

class tests.tools.nsys.test_nsys.TestTracingResultsView on GitHub

Bases: object

Test string representation of tracing results.

CUDA_API_TRACE: Final[DataFrame] = Start (us)  Duration (us)  ... T-Pri    Thread Name 0  176741.213          0.942  ...    20  tests_assets_ 1  176855.658      87265.752  ...    20  tests_assets_ 2  266224.028          1.753  ...    20  tests_assets_  [3 rows x 9 columns]
test() NoneView on GitHub

Test string representation of tracing results through conversion to a rich.table.Table.