Skip to main content

add-opencl-test

Add an OpenCL test or microbenchmark

소스 정보

저장소
ARM-software/tracetooltests
최근 소스 활동
2026년 6월 7일 17:31
감지된 SKILL.md 언어
영어
스타
9
포크
13

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
add-opencl-test
description
Add an OpenCL test or microbenchmark
metadata
{"short-description":"Add an OpenCL test"}
## Add A New OpenCL Test - Create source file `src/opencl_<name>.cpp`. - Add a bench file `benchmarking/opencl_<name>.bench`. - Register the test in `CMakeLists.txt` with `cl_test(<name> 300)`. - Use the cl_check() function to test OpenCL call return values. Put it on a separate line after the OpenCL call. Do not wrap the OpenCL call. - Build with 'make -j6' - Run from build directory without GPU: `./opencl_<name> -v --cpu`. - Run from build directory with GPU: `./opencl_<name> -v --gpu`. - Fix any errors shown in the output from the above runs. Minimal `src/opencl_<name>.cpp`: ```cpp #include "opencl_common.h" int main(int argc, char** argv) { opencl_req_t reqs{}; // Set reqs.usage and reqs.cmdopt for cmd line options opencl_setup_t cl = cl_test_init(argc, argv, "opencl_<name>", reqs); bench_start_iteration(cl.bench); // ... do work here ... bench_stop_iteration(cl.bench); cl_test_done(cl); return 0; } ``` Minimal `benchmarking/opencl_<name>.bench`: ```json { "name": "opencl_<name>", "description": "<short description of test>" } ```
GitHub에서 보기