Ștefan-Cosmin Ciocan 887c809d07 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
2023-12-27 10:00:14 +01:00
2018-05-04 10:26:11 -04:00
2019-12-07 10:55:01 -05:00

NVCC Plugin for Jupyter notebook

V2 is available

V2 brings support of multiple source and header files.

Usage
  • Load Extension

%load_ext nvcc_plugin

  • Mark a cell to be treated as cuda cell

%%cuda --name example.cu --compile false

NOTE: The cell must contain either code or comments to be run successfully. It accepts 2 arguments. -n | --name - which is the name of either CUDA source or Header The name parameter must have extension .cu or .h Second argument -c | --compile; default value is false. The argument is a flag to specify if the cell will be compiled and run right away or not. It might be usefull if you're playing in the main function

  • To compile and run all CUDA files you need to run
%%cuda_run
# This line just to bypass an exeption and can contain any text
  • To profile your CUDA kernels using NVIDIA Nsight Compute CLI profiler you need to run
%%cu --profile
  • You can add options to the profiler. Keep in mind that any argument after "--profiler-args" will be considered as a profiler argument. For example, to select which sections to collect metrics for you need to run
%%cu --profile --profiler-args --section SpeedOfLight --section MemoryWorkloadAnalysis --section Occupancy
S
Description
No description provided
Readme MIT 232 KiB
Languages
Jupyter Notebook 55.3%
Python 43%
Dockerfile 1.5%
Shell 0.2%