mirror of
https://github.com/andreinechaev/nvcc4jupyter.git
synced 2026-06-14 03:00:47 +05:30
Add option to use NVIDIA Nsight Compute CLI profiler (#21)
* Use NVIDIA Nsight Compute CLI profiler * Add profile and profiler-args options to argument parser. * Add missing comma to profiler-args option. * Use profile args in version 1 of the plugin * Change profiler-args option to take all remaining arguments * Change profiler_args type from string to list of strings * Add profile option to version 2 of the plugin * Add profiler usage instructions
This commit is contained in:
committed by
GitHub
parent
98c9faf45c
commit
887c809d07
+21
-2
@@ -3,8 +3,27 @@ import argparse
|
||||
|
||||
def get_argparser():
|
||||
parser = argparse.ArgumentParser(description='NVCCPlugin params')
|
||||
parser.add_argument("-t", "--timeit", action='store_true',
|
||||
help='flag to return timeit result instead of stdout')
|
||||
parser.add_argument(
|
||||
'-t',
|
||||
'--timeit',
|
||||
action='store_true',
|
||||
help='If set, returns the output of the "timeit" built-in ipython magic instead of stdout.',
|
||||
)
|
||||
parser.add_argument(
|
||||
'-p',
|
||||
'--profile',
|
||||
action='store_true',
|
||||
help='If set, runs the nvidia nsight compute profiler. Has no effect if used with --timeit.',
|
||||
)
|
||||
parser.add_argument(
|
||||
'-a',
|
||||
'--profiler-args',
|
||||
type=str,
|
||||
nargs=argparse.REMAINDER,
|
||||
default=[],
|
||||
help='Extra options that can be passed to the nvidia nsight compute profiler. '
|
||||
'Must be the last option given to the argument parser so you can pass arguments with dashes.',
|
||||
)
|
||||
return parser
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user