{"id":13713368,"url":"https://github.com/rib/gputop","last_synced_at":"2025-03-17T03:31:13.032Z","repository":{"id":24478684,"uuid":"27882749","full_name":"rib/gputop","owner":"rib","description":"A GPU profiling tool","archived":false,"fork":false,"pushed_at":"2020-11-09T16:30:01.000Z","size":7628,"stargazers_count":165,"open_issues_count":29,"forks_count":37,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-16T07:51:08.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-11T17:19:45.000Z","updated_at":"2025-03-13T01:08:44.000Z","dependencies_parsed_at":"2022-08-22T22:10:20.246Z","dependency_job_id":null,"html_url":"https://github.com/rib/gputop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rib%2Fgputop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rib%2Fgputop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rib%2Fgputop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rib%2Fgputop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rib","download_url":"https://codeload.github.com/rib/gputop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243968844,"owners_count":20376456,"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-08-02T23:01:33.983Z","updated_at":"2025-03-17T03:31:12.487Z","avatar_url":"https://github.com/rib.png","language":"C++","readme":"[![Build Status](https://travis-ci.org/rib/gputop.svg?branch=master)](https://travis-ci.org/rib/gputop)\n\n# gputop\n\nGPU Top is a tool to help developers understand GPU performance counters and provide graphical and machine readable data for the performance analysis of drivers and applications. GPU Top is compatible with all GPU programming apis such as OpenGL, OpenCL or Vulkan since it primarily deals with capturing periodic sampled metrics.\n\nGPU Top so far includes a web based interactive UI as well as a non-interactive CSV logging tool suited to being integrated into continuous regression testing systems. Both of these tools can capture metrics from a remote system so as to try an minimize their impact on the system being profiled.\n\nGPUs supported so far include: Haswell, Broadwell, Cherryview, Skylake, Broxton, Apollo Lake, Kabylake, Cannonlake and Coffeelake.\n\nIt's not necessary to build the web UI from source to use it since the latest tested version is automatically deployed to http://gputop.github.io\n\nIf you want to try out GPU Top on real hardware please follow these [build Instructions](https://github.com/rib/gputop/wiki/Build-Instructions) and give feedback [here](https://github.com/rib/gputop/issues).\n\n# Web UI Screenshot\n\n![](https://raw.githubusercontent.com/wiki/rib/gputop/images/webui-imgui-screenshot.png)\n\n# Starting the GPU Top server\n\nBefore you can use one of the clients, you need to start the GPU Top server. Since GPU Top is primarily a system wide analysis tool, you need to launch the server as root so that you can access information about any of the running processes using the GPU. You can done so by running :\n\n```\nsudo gputop\n```\n\n# CSV output example\n\nHere's an example from running `gputop-wrapper` like:\n\n```\ngputop-wrapper -m RenderBasic -c GpuCoreClocks,EuActive,L3Misses,GtiL3Throughput,EuFpuBothActive\n```\n\nFirstly the tool prints out a header that you might want to share with others to help ensure your comparing apples to apples when looking at metrics from different systems:\n\n```\nServer: localhost:7890\nSampling period: 1 s\nMonitoring system wide\nConnected\n\nSystem info:\n\tKernel release: 4.15.0-rc4+\n\tKernel build: #49 SMP Tue Dec 19 12:17:49 GMT 2017\nCPU info:\n\tCPU model: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\n\tCPU cores: 4\nGPU info:\n\tGT name: Kabylake GT2 (Gen 9, PCI 0x5916)\n\tTopology: 168 threads, 24 EUs, 1 slices, 3 subslices\n\tGT frequency range: 0.0MHz / 0.0MHz\n\tCS timestamp frequency: 12000000 Hz / 83.33 ns\nOA info:\n\tOA Hardware Sampling Exponent: 22\n\tOA Hardware Period: 699050666 ns / 699.1 ms\n```\n\nAnd then compactly prints the data collected. In this case the output was to a terminal and so the data is presented to be easily human readable. When output to a file then it will be a plain CSV file and numbers aren't rounded.\n\n```\n    Timestamp  GpuCoreClocks  EuActive      L3Misses  GtiL3Throughput  EuFpuBothActive\n         (ns)     (cycles/s)       (%)  (messages/s)              (B)              (%)\n 285961912416,770.9 M cycles,  0.919 %,   1473133.00,       89.91 MiB,         0.256 %\n 286992496416,900.1 M cycles,   1.04 %,   2036968.00,       124.3 MiB,         0.316 %\n 288190601500,521.4 M cycles,   1.81 %,   2030997.00,         124 MiB,         0.537 %\n 289519269500,1.028 G cycles,   11.8 %,  33181879.00,       1.978 GiB,          3.82 %\n 290562176250,1.007 G cycles,   11.1 %,  30115582.00,       1.795 GiB,          3.66 %\n 291569408333,905.9 M cycles,     10 %,  24534419.00,       1.462 GiB,          3.18 %\n 292590314500,762.4 M cycles,   6.89 %,  10934947.00,       667.4 MiB,          2.31 %\n 293954678166,538.5 M cycles,   1.72 %,   2034698.00,       124.2 MiB,         0.543 %\n 295323480416,751.6 M cycles,   1.28 %,   2034477.00,       124.2 MiB,         0.356 %\n```\n\n# Building GPU Top\n\n## Dependencies\n\nGPUTop uses the meson build system. On a recent distribution you can install meson with :\n\n```\nsudo apt-get install meson\n```\n\nAlternatively you can use the pip distribution mechanism :\n\n```\nsudo pip3 install meson\n```\n\nGPU Top without UI tools has minimal dependencies :\n\n```\nsudo apt-get install libssl-dev\npip2 install --user mako\n```\n\nIf you want to build the GLFW UI, also install the following dependencies :\n\n```\nsudo apt-get install libgl1-mesa-dev libegl1-mesa-dev libglfw3-dev libepoxy-dev\n```\n\nA Gtk+ backend is also available for the UI (users with retina displays will want to use this), you'll need the following dependencies :\n\n```\nsudo apt-get install libsoup2.4-dev libcogl-dev libgtk-3-dev\n```\n\n## Configuring the GPU Top build\n\nWithout UI :\n\n```\nmeson . build\n```\n\nWith GLFW UI :\n\n```\nmeson . build -Dnative_ui=true\n```\n\nWith Gtk+ UI :\n\n```\nmeson . build -Dnative_ui_gtk=true\n```\n\n## Building GPU Top\n\n```\nninja -C build\nninja -C build install\n```\n\n## Building GPU Top Web UI\n\nFirst make sure to have emscripten installed. GPU Top is currently\nonly tested with version 1.37.27 of the emscripten SDK. Instructions\nto download the SDK are available here :\n\nhttps://kripken.github.io/emscripten-site/docs/getting_started/downloads.html\n\nAfter having run :\n\n```\n./emsdk update\n```\n\nInstall the tested version :\n\n```\n./emsdk activate sdk-1.37.27-64bit\n./emsdk install sdk-1.37.27-64bit\n```\n\nThen configure GPU Top to build the Web UI (in that mode it'll only\nbuild the UI, you'll need to build the server in the different build\ndirectory).\n\n```\nmeson . build-webui -Dwebui=true --cross=scripts/meson-cross/emscripten-docker-debug.txt\n```\n\nCreate a directory to serve the UI and copy the files needed :\n\n```\nmkdir webui\ncp ui/*.html ui/*.css ui/favicon.ico webui/\ncp build-webui/ui/*.js build-webui/ui/*.wasm* build-webui/ui/gputop-ui.wast webui/\n```\n\nYou should now be able to serve the UI from the webui/ directory.\n","funding_links":[],"categories":["C++","Debugging \u0026 Profiling \u0026 Tracing"],"sub_categories":["For C++/C"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frib%2Fgputop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frib%2Fgputop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frib%2Fgputop/lists"}