pti-gpu icon indicating copy to clipboard operation
pti-gpu copied to clipboard

Unable to build onetrace on Windows

Open MichalMrozek opened this issue 10 months ago • 4 comments

I am getting following error

Build started at 12:04... 1>------ Build started: Project: ze_gen_headers, Configuration: Release x64 ------ 2>------ Build started: Project: level_zero_lib, Configuration: Release x64 ------ 3>------ Build started: Project: level_zero_headers, Configuration: Release x64 ------ 4>------ Build started: Project: cl_tracing_headers, Configuration: Release x64 ------ 5>------ Build started: Project: onetrace_tool, Configuration: Release x64 ------ 5>tool.cc 5>cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220). Defaulting to 220 (OpenCL 2.2) 5>C:\neo\pti-gpu\tools\ze_tracer\ze_api_collector.h(75,5): error C3861: 'SetTracingAPIs': identifier not found 5>(compiling source file '../tool.cc') 5>Done building project "onetrace_tool.vcxproj" -- FAILED. 6>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------ 6>Project not selected to build for this solution configuration ========== Build: 4 succeeded, 1 failed, 3 up-to-date, 1 skipped ========== ========== Build completed at 12:04 and took 01.409 seconds ==========

MichalMrozek avatar Feb 11 '25 11:02 MichalMrozek

Hi, have you tried using the Ninja generator instead? I managed to get it to build with cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release

However, I built w/oneAPI for their OpenCL loader.

oneAPI 2025.0.1 (icx 2025.0.4) VS2022 Professional Edition

Like this:

<oneapi/vcvars>
cd <>/onetrace
mkdir build
cd build
git clone https://github.com/KhronosGroup/OpenCL-Headers.git
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DOpenCL_INCLUDE_DIR=.\OpenCL-Headers
cmake --build .

Maybe with plain MSVC this will work, but I will need time to try it without the loader. Hitting some path issues building OpenCL-ICD-Loader on Window.s

mschilling0 avatar Feb 12 '25 00:02 mschilling0

I will note most of the users of onetrace would probably be better off using unitrace (which is a superset of this functionality).

mschilling0 avatar Feb 12 '25 00:02 mschilling0

Problem with unitrace is that it requires couple of GB of depenencies including whole OneAPI which is not making the build quick. Onetrace doesn't have this problem.

MichalMrozek avatar Feb 12 '25 03:02 MichalMrozek

@MichalMrozek, I have sent you an email with engineering build for lighter Unitrace build. Please take a look.

Sarbojit2019 avatar Mar 21 '25 15:03 Sarbojit2019

@MichalMrozek You can use BUILD_WITH_* to enable/disable oneAPI dependencies when building unitrace. The ontetrace is considered deprecated.

zma2 avatar Jul 14 '25 14:07 zma2