Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for Source Compile Incomplete/Incorrect #769

Open
Qubitium opened this issue Jan 10, 2025 · 2 comments
Open

Documentation for Source Compile Incomplete/Incorrect #769

Qubitium opened this issue Jan 10, 2025 · 2 comments
Assignees

Comments

@Qubitium
Copy link

Describe the bug

@ZailiWang Intel documentation is broken, doesn't compile due to AOT compiler not found (OCLOC) for AOT compile has broken links:

https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2023-0/ahead-of-time-compilation.html <-- instruction does not work. Will fail due to missing OCLOC aot compiler

https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-opencl-offline-compiler-ocloc.html <--- this link for ocloc compiler doesn't exists and our build stage is not working. We do know how to install it.

[31/742] Building SYCL device link file test_sycl/CMakeFiles/test_..._build_standalone.dir/test_sycl_build_standalone_sycl_device_obj.
FAILED: test_sycl/CMakeFiles/test_sycl_build_standalone.dir/test_sycl_build_standalone_sycl_device_obj.o /workspace/pytorch/build/test_sycl/CMakeFiles/test_sycl_build_standalone.dir/test_sycl_build_standalone_sycl_device_obj.o 
cd /workspace/pytorch/build/test_sycl && /opt/intel/oneapi/compiler/2025.0/bin/icpx -fPIC -fsycl -fsycl-targets=spir64_gen,spir64 -fno-sycl-unnamed-lambda -sycl-std=2020 -fhonor-nans -fhonor-infinities -fno-associative-math -fno-approx-func -Wno-absolute-value -no-ftz -D__INTEL_PREVIEW_BREAKING_CHANGES -D_GLIBCXX_USE_CXX11_ABI=1 -fsycl-fp64-conv-emu -fsycl-max-parallel-link-jobs=16 -fsycl-targets=spir64_gen,spir64 -fsycl-link /workspace/pytorch/build/test_sycl/CMakeFiles/test_sycl_build_standalone.dir//./test_sycl_build_standalone_generated_simple_kernel.cpp.o -Xs "-device\ pvc,xe-lpg,ats-m150\ -options\ '\ -cl-poison-unsupported-fp64-kernels\ -cl-intel-enable-auto-large-GRF-mode\ -cl-fp32-correctly-rounded-divide-sqrt'" -o /workspace/pytorch/build/test_sycl/CMakeFiles/test_sycl_build_standalone.dir/./test_sycl_build_standalone_sycl_device_obj.o
icpx: warning: ocloc tool could not be found and is required for AOT compilation. See: https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html for more information [-Waot-tool-not-found]
llvm-foreach: No such file or directory
icpx: error: gen compiler command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

We even tried the official oneapi docker which contains all the prereq packagers and build doesn't work:

docker run --name intel -it \
  --device /dev/dri \
  --ipc=host \
  -v /opt/docker2:/workspace \
  intel/oneapi-basekit:latest \
  /bin/bash -l

The ocloc appears to be inside the intel docker but the builder doesn't find it:

(base) root@1d7e1514dd9e:/workspace# find /opt -name ocloc
/opt/intel/oneapi/vtune/2025.0/bin64/gma/GTPin/Profilers/ocloc
/opt/intel/oneapi/vtune/2025.0/bin64/gma/GTPin/Profilers/ocloc/Bin/intel64/ocloc

Related: #764

Versions

(base) root@1d7e1514dd9e:/workspace# python collect_env.py
Collecting environment information...
=====================================
PyTorch version:   N/A
PyTorch CXX11 ABI: N/A
IPEX version:      N/A
IPEX commit:       N/A
Build type:        N/A
OS:                Ubuntu 24.04.1 LTS (x86_64)
GCC version:       (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Clang version:     N/A
IGC version:       2025.0.4 (2025.0.4.20241205)
CMake version:     version 3.31.2
Libc version:      glibc-2.39
Python version:    3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0] (64-bit runtime)
Python platform:   Linux-6.12.8-x64v3-xanmod1-x86_64-with-glibc2.39
Is XPU available:  N/A
DPCPP runtime:     2025.0
MKL version:       2025.0
GPU models and configuration onboard: 
N/A
GPU models and configuration detected: 
N/A
Driver version: 
* intel_opencl: 24.39.31294.21-1032~24.04
* level_zero:   1.3.30049.10-950~24.04
CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        52 bits physical, 57 bits virtual
Byte Order:                           Little Endian
CPU(s):                               96
On-line CPU(s) list:                  0-95
Vendor ID:                            GenuineIntel
Model name:                           INTEL(R) XEON(R) PLATINUM 8575C
CPU family:                           6
Model:                                207
Thread(s) per core:                   2
Core(s) per socket:                   48
Socket(s):                            1
Stepping:                             2
BogoMIPS:                             5600.00
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
L1d cache:                            2.3 MiB (48 instances)
L1i cache:                            1.5 MiB (48 instances)
L2 cache:                             96 MiB (48 instances)
L3 cache:                             320 MiB (1 instance)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-95
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Vulnerable
Vulnerability Spectre v1:             Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Vulnerability Spectre v2:             Vulnerable; IBPB: disabled; STIBP: disabled; PBRSB-eIBRS: Vulnerable; BHI: Vulnerable
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected
Versions of relevant libraries:
[conda] intel-cmplr-lib-ur        2025.0.4                 pypi_0    pypi
[conda] intel-openmp              2025.0.4                 pypi_0    pypi
[conda] mkl-include               2025.0.1                 pypi_0    pypi
[conda] mkl-static                2025.0.1                 pypi_0    pypi
[conda] numpy                     2.2.1                    pypi_0    pypi
@Qubitium
Copy link
Author

We bypassed the intel oneapi docker cannot find ocloc issue by doing manual linking to lib. This fix only applies if you the intel oneapi docker to compile. This issue/bug still applies as general guide to compile IPEX with AOT will not work as documented as install path/doc for OCLOC is missing (wrong web access permissions).

export LD_LIBRARY_PATH=/opt/intel/oneapi/vtune/2025.0/bin64/gma/GTPin/Profilers/ocloc/Bin/intel64:$LD_LIBRARY_PATH

@ZailiWang ZailiWang self-assigned this Jan 10, 2025
@ZailiWang
Copy link
Contributor

I'm not sure if you followed the guide as you linked a legacy 2023.0 instruction.

Actually you can simply try with the compile_bundle.sh script, setting AOT parameter as xe2-hpg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants