{"id":13734489,"url":"https://github.com/jrprice/Oclgrind","last_synced_at":"2025-05-08T10:31:52.190Z","repository":{"id":10795620,"uuid":"13066604","full_name":"jrprice/Oclgrind","owner":"jrprice","description":"An OpenCL device simulator and debugger","archived":false,"fork":false,"pushed_at":"2024-09-03T21:34:41.000Z","size":2716,"stargazers_count":355,"open_issues_count":45,"forks_count":62,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-23T08:51:42.938Z","etag":null,"topics":["debugger","opencl"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrprice.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","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":"2013-09-24T14:21:38.000Z","updated_at":"2025-04-05T01:34:20.000Z","dependencies_parsed_at":"2022-08-20T03:41:38.454Z","dependency_job_id":"1c78e043-0df8-4a96-a9c8-f9d7b9bb324a","html_url":"https://github.com/jrprice/Oclgrind","commit_stats":{"total_commits":1658,"total_committers":20,"mean_commits":82.9,"dds":0.1471652593486128,"last_synced_commit":"accf518f8623548417c344a0193aa9b531cc9486"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrprice%2FOclgrind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrprice%2FOclgrind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrprice%2FOclgrind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrprice%2FOclgrind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrprice","download_url":"https://codeload.github.com/jrprice/Oclgrind/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045790,"owners_count":21845773,"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":["debugger","opencl"],"created_at":"2024-08-03T03:00:56.436Z","updated_at":"2025-05-08T10:31:51.793Z","avatar_url":"https://github.com/jrprice.png","language":"C++","funding_links":[],"categories":["OpenCL Tools, Libraries and Frameworks","C++","CUDA Tools Libraries, and Frameworks"],"sub_categories":["viii. Linear Regression"],"readme":"Oclgrind\n========\n\nAbout\n-----\nThis project implements a virtual OpenCL device simulator, including\nan OpenCL runtime with ICD support. The goal is to provide a platform\nfor creating tools to aid OpenCL development. In particular, this\nproject currently implements utilities for debugging memory access\nerrors, detecting data-races and barrier divergence, collecting\ninstruction histograms, and for interactive OpenCL kernel debugging.\nThe simulator is built on an interpreter for LLVM IR. This project was\noriginally created by James Price and Simon McIntosh-Smith at the\nUniversity of Bristol.\n\nBinary releases can be found on the GitHub releases page:\n\n  https://github.com/jrprice/Oclgrind/releases\n\n\nBuild dependencies\n------------------\nTo build this project, you will need LLVM and Clang 11.0 (or newer)\ndevelopment libraries and headers. If you build LLVM from source, it\nis recommended to enable optimizations to significantly improve the\nperformance of Oclgrind (set `CMAKE_BUILD_TYPE` to `Release` or\n`RelWithDebInfo`).\n\nYou will need to use a compiler that supports C++14. Python should\nalso be available in order to run the test suite.\n\n\nBuilding on Linux and macOS (CMake)\n-----------------------------------\nThe recommended method of building Oclgrind is via CMake.\n\nWhen configuring the CMake build, you may be prompted to supply a\nvalue for the `LLVM_DIR` parameter (this shouldn't be necessary if\nLLVM is installed in a standard system location). This should be set\nto the directory containing your LLVM installation's\n`LLVMConfig.cmake` file (typically either\n`${LLVM_ROOT}/lib/cmake/llvm` or `${LLVM_ROOT}/share/llvm/cmake/`).\nIf Clang is installed separately to LLVM, then you may also be\nprompted to supply a path for the `CLANG_ROOT` parameter, which should\nbe the root of your Clang installation (containing the `bin/`, `lib/`\nand `include/` directories).\n\nA typical CMake command-line might look like this:\n\n    cmake ${OCLGRIND_SOURCE} \\\n          -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\n          -DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT} \\\n          -DLLVM_DIR=${LLVM_ROOT}/lib/cmake/llvm\n\nwhere `${OCLGRIND_SOURCE}` is the path to the root directory\ncontaining the Oclgrind source code, `${LLVM_ROOT}` is the path to the\nLLVM installation, and `${INSTALL_ROOT}` is the desired installation\nroot directory (this can be omitted if installing to system\ndirectories).\n\nNext, build and install with make:\n\n    make\n    make test\n    make install\n\nIf installing to a non-system location, you should add the `bin/`\ndirectory to the `PATH` environment variable in order to make use of\nthe `oclgrind` command. If you wish to use Oclgrind via the OpenCL ICD\nloader (optional), then you should create an ICD loading point by\ncopying the `oclgrind.icd` file from the build directory to\n`/etc/OpenCL/vendors/`.\n\n\nBuilding on Windows\n-------------------\nBuilding Oclgrind on Windows requires Visual Studio 2017 (or newer).\n\nWhen configuring the CMake build, you may be prompted to supply a\nvalue for the `LLVM_DIR` parameter. This should be set to the\ndirectory containing your LLVM installation's `LLVMConfig.cmake` file\n(for example `C:\\Program Files\\LLVM\\lib\\cmake\\llvm`). If Clang is\ninstalled separately to LLVM, then you may also be prompted to supply\na path in the `CLANG_ROOT` parameter, which should be the root of your\nClang installation (containing the `bin/`, `lib/` and `include/`\ndirectories).\n\nYou should add the `bin` directory of the Oclgrind installation to the\n`PATH` environment variable in order to make use of the `oclgrind`\ncommand. If you wish to use Oclgrind via the OpenCL ICD loader\n(optional), then you should also create an ICD loading point. To do\nthis, you should add a `REG_DWORD` value to the Windows Registry under\none or both of the registry keys below, with the name set to the\nabsolute path of the `oclgrind-rt-icd.dll` library and the value set\nto 0.\n\nKey for 32-bit machines or 64-bit apps on a 64-bit machine:\n`HKEY_LOCAL_MACHINE\\SOFTWARE\\Khronos\\OpenCL\\Vendors`\n\nKey for 32-bit apps on a 64-bit machine:\n`HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Khronos\\OpenCL\\Vendors`\n\n\nUsage\n-----\nThe recommended method of running an application with Oclgrind is to\nuse the `oclgrind` command, for example:\n\n    oclgrind ./application\n\nThis command will make it such the only OpenCL platform and device\navailable to your application is Oclgrind. If you need more control\nover platform selection then installing an ICD loading point for\nOclgrind will cause it to appear when an application calls\n`clGetPlatformIDs()`, alongside any other OpenCL platforms installed\non your system.\n\nIf it encounters any invalid memory accesses, Oclgrind will\nreport the details to stderr, for example:\n\n    Invalid write of size 4 at global memory address 0x1000000000040\n        Kernel:  vecadd\n        Entity:  Global(16,0,0) Local(0,0,0) Group(16,0,0)\n        store i32 %tmp9, i32 addrspace(1)* %tmp15, align 4\n        At line 4 of input.cl\n          c[i] = a[i] + b[i]\n\nSince it is interpreting an abstract intermediate representation and\nbounds-checking each memory access, Oclgrind will run quite slowly\n(typically a couple of orders of magnitude slower than a regular CPU\nimplementation). Therefore, it is recommended to run your application\nwith a small problem if possible.\n\nTo enable an interactive, GDB-style debugging session, supply the `-i`\nflag to the oclgrind command, or export the environment variable\n`OCLGRIND_INTERACTIVE=1`. This will cause Oclgrind to automatically\nbreak at the beginning of each kernel invocation, and upon\nencountering an invalid memory access. Type `help` for details of\navailable commands.\n\nFor more detailed information about using Oclgrind please visit the\nGitHub Wiki:\n\n  https://github.com/jrprice/Oclgrind/wiki/\n\n\nContact\n-------\nIf you encounter any issues or have any questions, please use the\nGitHub issues page:\n\n  https://github.com/jrprice/Oclgrind/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrprice%2FOclgrind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrprice%2FOclgrind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrprice%2FOclgrind/lists"}