{"id":19867703,"url":"https://github.com/cwsmith/hellokokkos3profiling","last_synced_at":"2025-07-11T14:07:06.398Z","repository":{"id":93888996,"uuid":"212126496","full_name":"cwsmith/helloKokkos3Profiling","owner":"cwsmith","description":"Kokkos 3 profiling example","archived":false,"fork":false,"pushed_at":"2019-10-01T19:26:04.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T15:52:28.592Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cwsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01T15:05:56.000Z","updated_at":"2019-10-01T19:33:17.000Z","dependencies_parsed_at":"2023-04-26T15:02:14.926Z","dependency_job_id":null,"html_url":"https://github.com/cwsmith/helloKokkos3Profiling","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/cwsmith%2FhelloKokkos3Profiling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2FhelloKokkos3Profiling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2FhelloKokkos3Profiling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2FhelloKokkos3Profiling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwsmith","download_url":"https://codeload.github.com/cwsmith/helloKokkos3Profiling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241279044,"owners_count":19938081,"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-12T15:30:03.673Z","updated_at":"2025-02-28T23:46:21.279Z","avatar_url":"https://github.com/cwsmith.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# helloKokkos3Profiling\nexample of Kokkos3 GPU profiling\n\nThe following instructions assume that Kokkos 3 (`cmake-promotion` branch) was\ninstalled with CMake and the kokkos-tools `nvprof-connector` library\n`kp_nvprof_connector.so` was compiled.\n\n# build on summit\n\n```\nmodule swap xl gcc/7.4.0\nmodule load cuda/10.1.168\nmodule load cmake\nexport CMAKE_PREFIX_PATH=/path/to/kokkos/install:$CMAKE_PREFIX_PATH\nmkdir build\ncd !$\ncmake /path/to/helloKokkos3Profiling/ -DCMAKE_CXX_COMPILER=/path/to/kokkos/bin/nvcc_wrapper\nmake \n```\n\n# run on summit\n\ncreate a run script `run.sh`:\n\n```\n#!/bin/bash\nmodule swap xl gcc/7.4.0\nmodule load cuda/10.1.168\nkkt=/path/to/kokkos-tools/nvprof-connector/kp_nvprof_connector.so\nexport KOKKOS_PROFILE_LIBRARY=$kkt\n#run on one process using one gpu\njsrun --tasks_per_rs 1 --nrs 1 --gpu_per_rs 1 --cpu_per_rs 1 \\\n   nvprof -m achieved_occupancy /path/to/hello/binary $((1024*1024))\n```\n\nmake it executable:\n\n```\nchmod +x run.sh\n```\n\nsubmit the job:\n\n```\nbsub -W 5 -nnodes 1 -P yourProjectId \u003c ./run.sh\n```\n\n# expected output\n\nsee `profilingOutput.txt`\n\n\nRunning under `nvprof` with no metrics collected, and the nvprof-connector\nkokkos-tools library set in the environment, will produce output with the\nnamed kokkos kernels listed under the NVTX heading.  'regions' created\nwith `Kokkos::Profiling::pushRegion(...)/popRegion()` will not be listed.\nWhen metrics are collected the nvprof output will not contain the named kokkos kernels.\n\nThe PR https://github.com/kokkos/kokkos-tools/pull/66,\nadds 'regions' under the NVTX heading when no metrics are collected.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwsmith%2Fhellokokkos3profiling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwsmith%2Fhellokokkos3profiling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwsmith%2Fhellokokkos3profiling/lists"}