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

build_dependencies.bat failes at CMake Error: install(EXPORT "DynamicDispatch-targets" ...) #143

Open
sidietz opened this issue Dec 13, 2024 · 7 comments

Comments

@sidietz
Copy link

sidietz commented Dec 13, 2024

I am trying to run a pytorch model on the NPU of my Ryzen AI 7 Pro 360 (Strix Point), however running build_dependencies.bat fails with the following error:

-- Renaming
--     C:/ryzentemp/build_dd/_deps/zlib-src/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- Configuring done (68.5s)
CMake Error: install(EXPORT "DynamicDispatch-targets" ...) includes target "transaction" which requires target "zlibstatic" that is not in any export set.
-- Generating done (0.2s)

CMake Generate step failed.  Build files cannot be regenerated correctly.
Error: cmake configuration failed.

The step pip install ops\torch_cpp --force-reinstall fails, too.
Running python quicktest.py from the Ryzen AI installation guide works.

Any ideas how to resolve that issue?

Thanks, sidietz.

EDIT:
After digging into the codebase I found that in the DynamicDispatch build process a git repository from xilinx.com is cloned, which seems to be no longer available:
https://gitenterprise.xilinx.com/VitisAI/aie_controller.git
Maybe that is related to this issue.

@MixoMax
Copy link

MixoMax commented Dec 18, 2024

+1
I Have the exact same issue.

CMake Error: install(EXPORT "DynamicDispatch-targets" ...) includes target "transaction" which requires target "zlibstatic" that is > not in any export set.
-- Generating done (0.6s)
CMake Generate step failed. Build files cannot be regenerated correctly.
Error: cmake configuration failed.

when i try to follow this guide:
https://github.com/amd/RyzenAI-SW/blob/main/example/transformers/models/llm/docs/README.md

@uday610
Copy link
Collaborator

uday610 commented Dec 18, 2024

Hi
This flow was released 5 months before and had been run sucessfully by multiple people. So issue could be missing steps or environments.

Make sure you have installed Visual Studio 2022 Community Edition with "Desktop Development with C++"

Also use Windows 11 CMD prompt

git config --global core.longpaths true
git lfs install
git clone --recurse-submodules https://github.com/amd/RyzenAI-SW.git
cd <transformers folder>

conda update -n base -c defaults conda -y
conda env create --file=env.yaml
conda activate ryzenai-transformers


build_dependencies.bat

@kenneth-ge
Copy link

I am getting the same issue! Even though I am using the VS 2022 developer command prompt, and using the anaconda environment specified in here as well: https://github.com/amd/RyzenAI-SW/blob/main/example/transformers/models/llm/docs/README.md

@fakelog
Copy link

fakelog commented Dec 22, 2024

+1

When build_dependencies.bat

-- Building version 0.2.0-dev
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- Found xaiengine::xaiengine: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/xaiengine.lib
-- Found target aie_controller: C:/ProgramData/miniconda3/envs/ryzenai-transformers/Lib/cmake/aie_controller
-- Found xaiengine::xaiengine: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/xaiengine.lib
-- Found XRT: D:/test_ai/RyzenAI-SW/example/transformers/third_party/xrt-ipu/xrt/share/cmake/XRT (found version "2.17.0")
-- Using ZLIB from FetchContent
-- Configuring done (1.5s)
CMake Error: install(EXPORT "DynamicDispatch-targets" ...) includes target "transaction" which requires target "zlibstatic" that is not in any export set.
-- Generating done (0.1s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
Error: cmake configuration failed.
(ryzenai-transformers) PS D:\test_ai\RyzenAI-SW\example\transformers>

@sunlambda
Copy link

+1

When build_dependencies.bat ,


(base) C:\Windows\System32>cd \Shared\RyzenAI-SW\example\transformers

(base) C:\Shared\RyzenAI-SW\example\transformers>conda activate ryzenai-transformers

(ryzenai-transformers) C:\Shared\RyzenAI-SW\example\transformers>build_dependencies.bat
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- Configuring done (0.1s)
-- Generating done (0.2s)
-- Build files have been written to: C:/Shared/RyzenAI-SW/example/transformers/build_aiert
MSBuild version 17.12.12+1cce77968 for .NET Framework

  1>Checking Build System
  Building Custom Rule C:/Shared/RyzenAI-SW/example/transformers/ext/aie-rt/driver/src/CMakeLists.txt
  xaiengine.vcxproj -> C:\Shared\RyzenAI-SW\example\transformers\build_aiert\Release\xaiengine.lib
  Building Custom Rule C:/Shared/RyzenAI-SW/example/transformers/ext/aie-rt/driver/src/CMakeLists.txt
  1>
  -- Install configuration: "Release"
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_helper.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_txn.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_core.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_core_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_core_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_elfloader.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_uc.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_device_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_device_aie2ipu.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_device_aie2p.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_device_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_device_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_dma.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_dma_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_dma_aie2p.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_dma_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_dma_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_events.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_events_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_events_aie2p.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_events_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_events_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie2pgbl_params.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie2psgbl_params.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_feature_config.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaiegbl.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaiegbl_defs.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaiegbl_dynlink.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaiegbl_params.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaiegbl_regdef.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaiemlgbl_params.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_interrupt.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_interrupt_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_interrupt_aie2ipu.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_interrupt_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_interrupt_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/isa_stubs.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_io_common.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_io_privilege.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_io.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_io_internal.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_hwcfg.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_internal.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_io.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_npi.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_regdef_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_regdef_aie2p.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_regdef_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_regdef_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_shim_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_shim_aie2ipu.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_shim_aie2p.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_shim_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_shim_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_lite_util.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_locks.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_locks_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_locks_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_mem.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_npi.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_perfcnt.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_plif.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_clock.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_ecc.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_reset.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_reset_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_reset_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_tilectrl.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_rsc.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_rsc_internal.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_ss.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_ss_aie.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_ss_aie2ps.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_ss_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_timer.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_trace.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_util.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_util_events.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_util_events_aieml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine/xaie_util_status.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/xaiengine.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/xaiengine.lib
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/xaiengine/xaiengine-targets.cmake
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/xaiengine/xaiengine-targets-release.cmak
  e
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/xaiengine/xaiengine-config.cmake
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/xaiengine/xaiengine-config-version.cmake
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- Found xaiengine::xaiengine: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/xaiengine.lib
-- Configuring done (0.0s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Shared/RyzenAI-SW/example/transformers/build_aiectrl
MSBuild version 17.12.12+1cce77968 for .NET Framework

  1>Checking Build System
  Building Custom Rule C:/Shared/RyzenAI-SW/example/transformers/ext/aie_controller/CMakeLists.txt
  1>
  -- Install configuration: "Release"
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/aie_controller/aie_controllerConfigVersi
  on.cmake
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/adf
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/adf/adf_api_message
  .h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/adf/adf_dbg.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/adf/adf_types.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/aiegraph.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/aiesim_tct
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/aiesim_tct/aie_tct_
  aiesim.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/device
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/device/aie-ml.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/device/aie2-ipu.
  h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/interpreter.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/interpreter_exec
  _impl.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/interpreter_op_i
  mpl.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/op_base.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/op_buf.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/op_defs.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/op_init.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/op_macros.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ps/op_types.h
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/ucode_gen.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/utils
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/include/ryzenai/aie_controller/utils/aie_control_p
  arser.hpp
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/aie_controller/aie_controllerConfigTarge
  ts.cmake
  -- Installing: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/cmake/aie_controller/aie_controllerConfig.cmak
  e
-- Building version 0.2.0-dev
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- Found xaiengine::xaiengine: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/xaiengine.lib
-- Found target aie_controller: C:/ProgramData/miniconda3/envs/ryzenai-transformers/Lib/cmake/aie_controller
-- Found xaiengine::xaiengine: C:/ProgramData/miniconda3/envs/ryzenai-transformers/lib/xaiengine.lib
-- Found XRT: C:/Shared/RyzenAI-SW/example/transformers/third_party/xrt-ipu/xrt/share/cmake/XRT (found version "2.17.0")
-- Using ZLIB from FetchContent
-- Configuring done (3.2s)
CMake Error: install(EXPORT "DynamicDispatch-targets" ...) includes target "transaction" which requires target "zlibstatic" that is not in any export set.
-- Generating done (0.4s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
Error: cmake configuration failed.

(ryzenai-transformers) C:\Shared\RyzenAI-SW\example\transformers>

Help!?

@Nick-infinity
Copy link

There is some issue with build_dependencies.bat . Please try to build using build_dependencies.ps1 powershell script via powershell. It works fine for me.

@poganesh
Copy link
Contributor

poganesh commented Jan 3, 2025

I encountered a similar issue while running build_dependencies.bat and was able to resolve it by following these steps:

  1. Clone the repository and initialize the environment as per the instructions:
git lfs install
git clone https://github.com/amd/RyzenAI-SW.git
git lfs pull

cd <transformers>
set TRANSFORMERS_ROOT=%CD%
conda env create --file=env.yaml
conda activate ryzenai-transformers
  1. Before running build_dependencies.bat, install the following dependencies in the activated environment:
pip install zstandard==0.23.0
conda install zlib
  1. After this, proceed to run build_dependencies.bat, and the issue should be resolved.

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

8 participants