Package: deepview-profile
DeepView.Profile is a tool to profile and debug the training performance ofPyTorchneural networks.InstallationUsage exampleDevelopment Environment SetupRelease HistoryMetaContributingInstallationDeepView.Profile works withGPU-basedneural networks that are implemented inPyTorch.To run DeepView.Profile, you need:A system equipped with an NVIDIA GPUPython 3.7+PyTorch 1.1.0+ with CUDANOTE:We assume you have the correct version of PyTorch installed for their GPU. Default PyTorch installation on Linux distros might not have CUDA support. If you see error similar to below, your PyTorch version is incompatible with your version of CUDA. You can download the appropriate version from thePyTorch siteThe current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the NVIDIA GeForce RTX 3060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/For new RTX 4000 GPUs you need to install pytorch with cuda11.8 [pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118] otherwise CUPTI will not initialize correctlyInstallation from PyPiInstalling withPippipinstalldeepview-profileInstallation from sourcegitclonehttps://github.com/CentML/DeepView.ProfilecdDeepView.Profile
poetryinstall
poetryrundeepview--helpUsage exampleTo use DeepView.Profile in your project, you need to first write an entry point file, which is a regular Python file that describes how your model is created and trained. See theEntry Pointfor more information.Once your entry point file is ready, there are two ways to profile interactive profiling and standalone profiling.Interactive ProfilingInteractive profiling is done with VSCode with theDeepView.Exploreplugin. Install the plugin in VSCode and run the profiling session to interactively profile your models.python3-mdeepview_profileinteractiveStandalone ProfilingStandalone profiling is useful when you just want access to DeepView.Profile's profiling functionality. DeepView.Profile will save the profiling results (called a "report") into aSQLite database filethat you can then query yourself. We describe the database schema for DeepView.Profile's run time and memory reports in theRun Time Report FormatandMemory Report Formatpages respectively.To have DeepView.Profile perform run time profiling, you use thedeepview timesubcommand. In addition to the entry point file, you also need to specify the
file where you want DeepView.Profile to save the run time profiling report using the--outputor-oflag.python3-mdeepview_profiletimeentry_point.py--outputmy_output_file.sqliteLaunching memory profiling is almost the same as launching run time profiling.
You just need to usedeepview memoryinstead ofdeepview time.python3-mdeepview_profilememoryentry_point.py--outputmy_output_file.sqliteTo export various available analysis to json file, you may usedeepview analysis --allcommand for exact entry point and output file. It is required to later view the analysis on the web viewer.It is also possible to run several optional analysis. There are such analysis available:--measure-breakdown,--measure-throughput,--habitat-predict,--measure-utilization,--energy-compute,--exclude-sourcepython3-mdeepview_profileanalysisentry_point.py--all--exclude-source--output=complete_analysis.json--exclude-sourceoption allows not addingencodedFilessection to output, that is available for--measure-breakdownanalysisor various combinations of optional analysispython3-mdeepview_profileanalysisentry_point.py--measure-breakdown--measure-throughput--habitat-predict--measure-utilization--energy-compute--output=various_analysis.jsonDevelopment Environment SetupFrom the project root, dopoetryinstallRelease HistorySeeReleasesMetaDeepView.Profile began as a research project at theUniversity of Torontoin collaboration withGeofrey Yu,Tovi GrossmanandGennady Pekhimenko.The accompanying research paper appears in the proceedings of UIST'20. If you are interested, you can read a preprint of the paperhere.If you use DeepView.Profile in your research, please consider citing our paper:@inproceedings{skyline-yu20,title={{Skyline: Interactive In-Editor Computational Performance Profilingfor Deep Neural Network Training}},author={Yu, Geoffrey X. and Grossman, Tovi and Pekhimenko, Gennady},booktitle={{Proceedings of the 33rd ACM Symposium on User InterfaceSoftware and Technology (UIST'20)}},year={2020},}It is distributed under Apache 2.0 license. SeeLICENSEandNOTICEfor more information.ContributingCheck outCONTRIBUTING.mdfor more information on how to help with DeepView.Profile.