{"id":18711125,"url":"https://github.com/rocm/rocmprofiledata","last_synced_at":"2025-04-12T11:35:13.807Z","repository":{"id":76898807,"uuid":"212861237","full_name":"ROCm/rocmProfileData","owner":"ROCm","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-19T04:59:06.000Z","size":2633,"stargazers_count":21,"open_issues_count":9,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T06:22:33.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ROCm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-04T16:45:16.000Z","updated_at":"2025-03-06T10:59:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"22d29e55-f680-4990-84c6-bc315565aac6","html_url":"https://github.com/ROCm/rocmProfileData","commit_stats":null,"previous_names":["rocm/rocmprofiledata"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FrocmProfileData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FrocmProfileData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FrocmProfileData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2FrocmProfileData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ROCm","download_url":"https://codeload.github.com/ROCm/rocmProfileData/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560715,"owners_count":21124709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:37:09.853Z","updated_at":"2025-04-12T11:35:13.801Z","avatar_url":"https://github.com/ROCm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rocm Profile Data\n\n--------------------------------------------------------------------------------\n\nROCm Profile Data is a collection of tools for tracing and analyzing gpu related activity on a system.  This is represented by a timeline of api calls, app log messages, async gpu operations, and related interactions/dependencies.\n\n\nContents:\n\u003c!-- toc --\u003e\n\n- [About](#about)\n- [Installation](#installation)\n- [Quickstart](#quickstart)\n- [Tools](#tools)\n  - [runTracer.sh](#runtracer.sh)\n  - [sqlite3](#sqlite3)\n  - [rpd2tracing.py](#rpd2tracing.py)\n\n\u003c!-- tocstop --\u003e\n\n\n## About\n\nThe ROCm Profiler Data or RPD ecosystem consists of the following:\n- Collection tools - Profilers capable of detecting and logging gpu activity\n- File format - A standard file format (based on sqlite3) for collection and analysis tools to work with\n- Analysis tools - Programs capable of interpreting the profile data in a meaningful way.  These can be written in SQL, C/C++, python, etc.\n\n\n## Installation\n\nRPD makes heavy use to SQLite(https://sqlite.org/index.html).  You will want to install the runtime and dev packages before preceeding.  E.g.\n```\napt-get install sqlite3 libsqlite3-dev\n```\n\nAdditional packages required\n```\napt-get install libfmt-dev\n```\n\nThere are many tools in the RPD repo.  A baseline set can be built and installed via make:\n```\nmake; make install\n```\nThis will install python modules that are used to manipulate trace files.\nIt will also build and install the native tracer, rpd_tracer.\n\n## Quickstart\n\n+ Install per the [Installation](#installation) section.\n+ Try each of the [Tools](#tools) below, in order.\n+ You can refer to our step-by-step [tutorial](examples/rocm-profile-data/README.md) in this repository to profile and trace your application. Additionally, we have provided a list of key tables and views defined in the generated `rpd` file for your reference.\n\n## Tools\n\n#### Raptor\nRaptor is an RPD post-processing script (raptor/raptor.py), plus a parsing class to enable deeper analysis with Python Pandas.\nSee the raptor [README](raptor/README.md) for more information.\n\n#### runTracer.sh\nRunTracer.sh is used to launch and trace a program.  It is installed in the system path as part of 'make install'.  It can trace any process and its subprocesses.\n```\nrunTracer.sh python exampleWorkload.py\n```\nBy default the profile will be written to \"trace.rpd\".\n\n#### sqlite3\nQuick inspection of trace data can be performed with the sqlite3 command line\n```\nsqlite3 trace.rpd\n\nsqlite\u003e select count(*) from rocpd_api;\n978621\nsqlite\u003e select count(*) from rocpd_op;\n111899\nsqlite\u003e select * from top;\nName                                      TotalCalls  TotalDuration  Ave         Percentage\n----------------------------------------  ----------  -------------  ----------  ----------------\nCijk_Alik_Bljk_SB_MT64x128x16_SN_1LDSB0_  3180        3670897        1154        33.1596545434822\nCijk_Alik_Bljk_SB_MT64x128x16_MI32x32x2x  12720       1703806        133         15.3906835540479\nCijk_Alik_Bljk_SB_MT128x128x16_MI32x32x1  3180        1471672        462         13.2937917318908\nvoid at::native::legacy::elementwise_ker  22525       1059802        47          9.57331814908329\nvoid at::native::legacy::elementwise_ker  13593       515243         37          4.65425092430873\n...\nsqlite\u003e .exit\n\n```\n\n#### rpd2tracing.py\nTrace data can be viewed in chrome://tracing for visualization.  Rpd2tracing.py exports the trace contents as a json file suitable for chrome://tracing or perfetto.\n```\npython3 tools/rpd2tracing.py trace.rpd trace.json\n```\n### Autocop submodule setup\n\nThe autocoplite submodule contains a visualization toolkit compatible with ```trace.rpd``` files. To use the visualization capabilities of this submodule, from within the main rocmProfileData repository, cd into the autcoplite submodule directory and initialize the submodule:\n\n  ```sh\n  git submodule update --init --recursive\n  ```\n\nThis command will initialize, fetch and checkout the submodule to the commit specified in the main repository.\n\nTo update the submodule at any time and pull the latest changes, run:\n\n  ```sh\n  git submodule update --remote\n  ```\nYou can use the provided Makefile to install the dependencies into a python virtual environment named ```aclite```. Simply run:\n\n```sh\nmake install\n```\n\nAlternatively, you can manually install the packages using **pip**:\n\n```sh\npip install -r requirements.txt\n```\n\nTo uninstall the packages and remove the virtual environment, you can use the Makefile:\n\n```sh\nmake clean\n```\n\n or manually remove the virtual env:\n\n ```sh\n rm -rf aclite\n```\n\nFollow the README.md file within the autocoplite submodule for additional instructions and examples for how to run. \n\n### cpptrace submodule setup\n\nThe cpptrace submodule adds the ability to capture stacktraces for every HIP API invocation. The module needs to be initialized and updated for this:\n```sh\ngit submodule update --init --recursive\n```\n\nThis command will initialize, fetch and checkout the submodule to the commit specified in the main repository.\n\nTo update the submodule at any time and pull the latest changes, run:\n\n```sh\ngit submodule update --remote\n```\n\n`make` will subsequently build `cpptrace` and link `rpd_tracer` against it. Enabling stacktrace capture requires setting `RPDT_STACKFRAMES=1`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Frocmprofiledata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocm%2Frocmprofiledata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Frocmprofiledata/lists"}