mirror of
https://github.com/andreinechaev/nvcc4jupyter.git
synced 2026-06-15 19:50:50 +05:30
Add tests for choosing the profiler
This commit is contained in:
Vendored
+13
@@ -1,9 +1,11 @@
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from IPython.core.interactiveshell import InteractiveShell
|
||||
|
||||
from nvcc4jupyter.parsers import Profiler
|
||||
from nvcc4jupyter.plugin import NVCCPlugin
|
||||
|
||||
|
||||
@@ -70,3 +72,14 @@ def multiple_source_fpaths(fixtures_path: str):
|
||||
pattern_h = os.path.join(fixtures_path, "multiple_files", "*.h")
|
||||
pattern_cu = os.path.join(fixtures_path, "multiple_files", "*.cu")
|
||||
return list(glob.glob(pattern_h)) + list(glob.glob(pattern_cu))
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def default_args():
|
||||
return argparse.Namespace(
|
||||
timeit=False,
|
||||
profile=True,
|
||||
profiler=lambda: Profiler.NCU,
|
||||
profiler_args=lambda: "",
|
||||
compiler_args=lambda: "",
|
||||
)
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "[NCU]"
|
||||
|
||||
# this is a mock of nsight compute cli tool that just executes the program
|
||||
# given as the last argument
|
||||
"${@: -1}"
|
||||
|
||||
echo "==WARNING== No kernels were profiled"
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "[NSYS]"
|
||||
|
||||
# this is a mock of nsight systems cli tool that just executes the program
|
||||
# given as the last argument
|
||||
"${@: -1}"
|
||||
Reference in New Issue
Block a user