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

Undefined reference in ocloc when compiling compute-runtime #323

Closed
dbermond opened this issue Apr 10, 2024 · 3 comments
Closed

Undefined reference in ocloc when compiling compute-runtime #323

dbermond opened this issue Apr 10, 2024 · 3 comments

Comments

@dbermond
Copy link
Contributor

When compiling compute-runtime, ocloc fails with a lot of 'undefined reference' errors, such like these ones:

error: undefined reference to `__builtin_spirv_OpImageWrite_img3d_wo_v4i32_v4i32_i32'
in function: '__builtin_spirv_OpImageWrite_img3d_wo_v4i32_v4i32_i32' called by kernels:
  - 'CopyBufferToImage3d16Bytes'
  - 'CopyBufferToImage3d8Bytes'
  - 'CopyBufferToImage3d4Bytes'
  - 'CopyBufferToImage3d2Bytes'
  - 'CopyBufferToImage3dBytes'

error: backend compiler failed build.

error: undefined reference to `__builtin_spirv_BuiltInGlobalInvocationId'
in function: '__builtin_spirv_BuiltInGlobalInvocationId' called by kernels:
  - 'CopyBufferToImage3dBytes'
  - 'CopyBufferToImage3d2Bytes'
  - 'CopyBufferToImage3d4Bytes'
  - 'CopyBufferToImage3d8Bytes'
  - 'CopyBufferToImage3d16Bytes'

error: backend compiler failed build.

Build failed with error code: -11
Command was: /build/intel-compute-runtime/src/build/bin/ocloc -q -file /build/intel-compute-runtime/src/build/bin/built_ins/x64/gen8/stateless_copy_buffer_to_image3d_stateless_bdw.spv -spirv_input -device 8.0.0 -cl-intel-greater-than-4GB-buffer-required -64 -output stateless_copy_buffer_to_image3d_stateless_8_0_0 -output_no_suffix -out_dir /build/intel-compute-runtime/src/build/bin/built_ins/x64/gen8 -options "-cl-kernel-arg-info"

A complete error log is attached here.

IGC is being built with the exact dependency versions/commits specified in the release page, using the 'Source' build way (no 'PreBuilds' dependencies).

The last good IGC + Neo versions that compiled fine were 1.0.15610.11 + 23.48.27912.11 respectively. These errors appeared since versions 1.0.15770.11 + 23.52.28202.14.

Another user opened this issue in the compute-runtime repository, and an Intel developer told to report it here, as it seems to be in the IGC side.

System information:

  • OS: Arch Linux
  • Compiler: gcc 13.2.1
@pvelesko
Copy link

pvelesko commented Apr 10, 2024

related to #313 which links to intel/compute-runtime#704

@dbermond
Copy link
Contributor Author

Not sure if it matters, but IGC in this setup is being built with IGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=OFF. If setted to ON, the cmake configuration fails.

And changing IGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_SC to ON or OFF does not make any difference in the problem.

@dbermond
Copy link
Contributor Author

In time: using IGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_SC=OFF makes it to work fine. Maybe this can be documented.

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