{"id":13830412,"url":"https://github.com/Oblomov/clinfo","last_synced_at":"2025-07-09T11:33:02.724Z","repository":{"id":1598230,"uuid":"10524841","full_name":"Oblomov/clinfo","owner":"Oblomov","description":"Print all known information about all available OpenCL platforms and devices in the system","archived":false,"fork":false,"pushed_at":"2023-11-10T05:00:39.000Z","size":656,"stargazers_count":287,"open_issues_count":11,"forks_count":72,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-03-15T02:13:37.842Z","etag":null,"topics":["gpgpu","hardware-information","opencl"],"latest_commit_sha":null,"homepage":null,"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/Oblomov.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}},"created_at":"2013-06-06T11:18:09.000Z","updated_at":"2024-03-08T08:50:05.000Z","dependencies_parsed_at":"2023-02-15T12:31:04.824Z","dependency_job_id":"ec76aecf-f9df-4973-8e47-bc687ffe1052","html_url":"https://github.com/Oblomov/clinfo","commit_stats":{"total_commits":466,"total_committers":16,"mean_commits":29.125,"dds":0.0429184549356223,"last_synced_commit":"97b16a6d011f0e2812e413ffad1a8bad5af48d23"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblomov%2Fclinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblomov%2Fclinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblomov%2Fclinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oblomov%2Fclinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oblomov","download_url":"https://codeload.github.com/Oblomov/clinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539391,"owners_count":17485318,"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":["gpgpu","hardware-information","opencl"],"created_at":"2024-08-04T10:00:59.630Z","updated_at":"2024-11-20T11:30:45.075Z","avatar_url":"https://github.com/Oblomov.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# What is this?\n\nclinfo is a simple command-line application that enumerates all possible\n(known) properties of the OpenCL platform and devices available on the\nsystem.\n\nInspired by AMD's program of the same name, it is coded in pure C and it\ntries to output all possible information, including those provided by\nplatform-specific extensions, trying not to crash on unsupported\nproperties (e.g. 1.2 properties on 1.1 platforms).\n\n# Usage\n\n    clinfo [options...]\n\nCommon used options are `-l` to show a synthetic summary of the\navailable devices (without properties), and `-a`, to try and show\nproperties even if `clinfo` would otherwise think they aren't supported\nby the platform or device.\n\nRefer to the man page for further information.\n\n## Use cases\n\n* verify that your OpenCL environment is set up correctly;\n  if `clinfo` cannot find any platform or devices (or fails to load\n  the OpenCL dispatcher library), chances are high no other OpenCL\n  application will run;\n* verify that your OpenCL _development_ environment is set up\n  correctly: if `clinfo` fails to build, chances are high no\n  other OpenCL application will build;\n* explore/report the actual properties of the available device(s).\n\n## Segmentation faults\n\nSome faulty OpenCL platforms may cause `clinfo` to crash. There isn't\nmuch `clinfo` itself can do about it, but you can try and isolate the\nplatform responsible for this. On POSIX systems, you can generally find\nthe platform responsible for the fault with the following one-liner:\n\n    find /etc/OpenCL/vendors/ -name '*.icd' | while read OPENCL_VENDOR_PATH ; do clinfo -l \u003e /dev/null ; echo \"$? ${OPENCL_VENDOR_PATH}\" ; done\n\n## Missing information\n\nIf you know of device properties that are exposed in OpenCL (either as core\nproperties or as extensions), but are not shown by `clinfo`, please [open\nan issue](https://github.com/Oblomov/clinfo/issues) providing as much\ninformation as you can. Patches and pull requests accepted too.\n\n\n# Building\n\n\u003cimg\nsrc='https://api.travis-ci.org/Oblomov/clinfo.svg?branch=master'\nalt='Build status on Travis'\nstyle='float: right'\u003e\n\nBuilding requires an OpenCL SDK (or at least OpenCL headers and\ndevelopment files), and the standard build environment for the platform.\nNo special build system is used (autotools, CMake, meson, ninja, etc),\nas I feel adding more dependencies for such a simple program would be\nexcessive. Simply running `make` at the project root should work.\n\n## Android support\n\n### Local build via Termux\n\nOne way to build the application on Android, pioneered by\n[truboxl][truboxl] and described [here][issue46], requires the\ninstallation of [Termux][termux], that can be installed via Google Play\nas well as via F-Droid.\n\n[truboxl]: https://github.com/truboxl\n[issue46]: https://github.com/Oblomov/clinfo/issues/46\n[termux]: https://termux.com/\n\nInside Termux, you will first need to install some common tools:\n\n\tpkg install git make clang -y\n\n\nYou will also need to clone the `clinfo` repository, and fetch the\nOpenCL headers (we'll use the official `KhronosGroup/OpenCL-Headers`\nrepository for that):\n\n\tgit clone https://github.com/Oblomov/clinfo\n\tgit clone https://github.com/KhronosGroup/OpenCL-Headers\n\n(I prefer doing this from a `src` directory I have created for\ndevelopment, but as long as `clinfo` and `OpenCL-Headers` are sibling\ndirectories, the headers will be found. If not, you will have to\noverride `CPPFLAGS` with e.g. `export CPPFLAGS=-I/path/to/where/headers/are`\nbefore running `make`.\nOf course `/path/to/where/headers/are` should be replaced with the actual\npath to which the `OpenCL-Headers` repository was cloned.)\n\nYou can then `cd clinfo` and build the application. You can try simply\nrunning `make` since Android should be autodetected now, buf it\nthis fails you can also force the detectio with\n\n\tmake OS=Android\n\nIf linking fails due to a missing `libOpenCL.so`, then your Android\nmachine probably doesn't support OpenCL. Otherwise, you should have a\nworking `clinfo` you can run. You will most probably need to set\n`LD_LIBRARY_PATH` to let the program know where the OpenCL library is at\nruntime: you will need at least `${ANDROID_ROOT}/vendor/lib64`, but on\nsome machine the OpenCL library actually maps to a different library\n(e.g., on one of my systems, it maps to the GLES library, which is in a\ndifferent subdirectory).\n\nDue to this requirement, on Android the actual binary is now called\n`clinfo.real`, and the produced `clinfo` is just a shell script that\nwill run the actual binary after setting `LD_LIBRARY_PATH`. If this\nis not sufficient on your installation, please open an issue and we'll\ntry to improve the shell script to cover your use case as well.\n\n## MacOS support\n\nclinfo should build without issues out of the box on most macOS installations\n(starting from OS X v10.6).\nIn contrast to most other operating systems,\nthe macOS system OpenCL library only supports Apple's own OpenCL platform.\n\nTo use other platforms such as [PoCL](https://portablecl.org),\nit is necessary to install an alternative OpenCL library that works as an ICD loader,\nsuch as [Homebrew](https://brew.sh)'s [ocl-icd](https://formulae.brew.sh/formula/ocl-icd).\n\nTo build `clinfo` using the Homebrew OpenCL library instead of the macOS system library,\nyou can use\n\n    make OS=Homebrew\n\n\n## Windows support\n\nThe application can usually be built in Windows too (support for which\nrequired way more time than I should have spent, really, but I digress),\nby running `make` in a Developer Command Prompt for Visual Studio,\nprovided an OpenCL SDK (such as the Intel or AMD one) is installed.\n\nPrecompiled Windows executable are available as artefacts of the\nAppVeyor CI.\n\n\u003ctable style='margin: 1em auto; width: 100%; max-width: 33em'\u003e\n\u003ctr\u003e\u003cth\u003eBuild status\u003c/th\u003e\u003cth colspan=2\u003eWindows binaries\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href='https://ci.appveyor.com/project/Oblomov/clinfo/'\u003e\u003cimg\nsrc='https://ci.appveyor.com/api/projects/status/github/Oblomov/clinfo?svg=true'\nalt='Build status on AppVeyor'\u003e\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ca href='https://ci.appveyor.com/api/projects/oblomov/clinfo/artifacts/clinfo.exe?job=platform%3a+x86'\u003e32-bit\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\u003ca href='https://ci.appveyor.com/api/projects/oblomov/clinfo/artifacts/clinfo.exe?job=platform%3a+x64'\u003e64-bit\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOblomov%2Fclinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOblomov%2Fclinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOblomov%2Fclinfo/lists"}