-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add support for VCK5000 over PCIe #77
Comments
Hi Lorenzo... Most of the flow would be the same for a VCK5000. The main difference would be the base system design, which would probably have to be modified slightly. Our intention is to do this at some point, but it hasn't happened yet. |
Thanks for your reply!
I'm looking forward to reciving your reply ASAP. :-D |
|
If you're interested prototyping the PCIe path for VCK5000, we're happy to provide some support to getting things up and running. |
Hello -- I also have a VCK5000 I'd like to target. How should the installation instructions change? I'm currently unsure what I should be doing to provide the sysroot directory when building MLIR-AIE. |
@elliottbinder Probably the easiest way to bring up the VCK5000 would be to avoid cross-compiling the mlir-aie tools. Instead, they would run on x86 and configure the AIE device over PCIe. This would remove the need for a sysroot. I believe with the new libXAIE v2 that this should work, but we have not tested it. We are currently bringing up libXAIEv2 on ARM first. |
Is omitting the VitisSysroot definition in the build instructions sufficient? Building with ninja proceeded fine, but I'm getting this error when testing with check-aie:
It looks like this could be because peano isn't installed, but I don't see that listed as a prerequisite. |
@elliottbinder Sorry about that... I've checked in a fix. |
Your fix resolved that issue, thanks! I'm able to get through the building step, but cmake is saying
which, according to another issue, looks like it might be related to the sysroot -- is that right? What can I do to locate or install LibXAIE?
|
Hi @elliottbinder, first I believe the failed test cases are due to the missing of LibXAIE. Basically you need to follow the instructions here to build the |
If you're cross-compiling, hanchen is correct. If you're just compiling to run on X86, then you can get libXAIE sources here: https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/aiengine. After compiling the you can point cmake to the right location with -DLibXAIE_ROOT=... |
I tried making aiengine, but got a missing file error on |
Hi @elliottbinder, I also get stuck on building AIE tools. Are you willing to share your workflow after cloning mlir-aie projects? I downloaded https://github.com/Xilinx/embeddedsw and changed the instruction of building AIE tools: I replaced "-DVitisSysroot=${SYSROOT}" with "-DLibXAIE_DIR=${aienginev2_path}" and I also encountered missing of head file. |
Hi @stephenneuendorffer, thank you very much for your support! I'm doing some initial research about MLIR-AIE tools for my team. My team will work on prototype develop if I run the test files successfully on VCK5000. According to your answer, we have confidence in doing this. As your saying "avoid to cross-compile", should I replace "-DLLVM_TARGETS_TO_BUILD:STRING="X86;ARM;AArch64;" with "-DLLVM_TARGETS_TO_BUILD:STRING="X86" in the step of building llvm by cmake? What's more, I also downloaded the libXAIE you mentioned above and added its path in cmake by -DLibXAIE_DIR. But it failed to build. |
I think you need this too: https://github.com/OpenAMP/libmetal. |
In general, when you run cmake on an x86 machine, you're going to build x86 binaries. By default you'll build a compiler (An X86 binary) capable of generating code for multiple architectures (X86, Arm32 and Arm64). If you make this change, the newly built compiler will only generate X86 code. This might be sufficient for a VCK5000 environment. It's also possible to cross-compile the mlir-aie tools.. We normally do this to build mlir-aie tools that run on ARM. Those tools will run on ARM and be able to generate code for multiple architectures (X86, Arm32 and Arm64). In this case, the X86 code generation is probably unnecessary, since we're probably mostly generating code for Arm64... (Note that in LLVM AArch64 depends on ARM). |
In general, I wouldn't recommend this.. The fan is there for a reason... Probably you can run without the fan for light workloads, but the device can generate quite a bit of heat when fully utilized. I'm used to the VCK190 where the fans slow down greatly after powerup. I'm surprised the VCK5000 doesn't have similar management |
Once I turn on my PC after connecting VCK5000, the room is full of noise and it impacts greatly all people in the office... So I can only remove VCK5000 from PC and connect it when I need to use. |
Thanks Stephen, I'll try again. |
Can you verify what board version you have and what system controller firmware version? |
I built libmetal from the github without an issue, but then when building aiengine I get another missing header file (metal/shmem-provider.h). It looks like this is present in a different version of libmetal -- the one packaged with embeddedsw -- but when building that version of libmetal, I get an error partway through the build process:
It looks like this might have been fixed in a later version of libmetal (I was able to build from the github repo no problem), but the newer version isn't what aiengine is expecting to work with. I'm not sure what would be best: getting aiengine working by fixing libmetal and any other issues that come up, or try to get aienginev2 up and running with MLIR-AIE. I'm building MLIR-AIE with these addition flags: I also ran into the fan issue, as others have: https://support.xilinx.com/s/question/0D52E00006khDFQSA2/vck5000-fan-noise-alternating?language=en_US |
This is apparently expected and you're not the only one who has complained. :) I'm still trying to find out whether this is something that might be changed in a future system controller firmware version. |
Note that the cmake 'hint' for locating libXAIE should be -DLibXAIE_ROOT=.... |
Hi @elliottbinder, I also ran into the same error when I built libmetal from https://github.com/Xilinx/embeddedsw/tree/master/ThirdParty/sw_services/libmetal/src/libmetal but I built libmetal successfully from https://github.com/OpenAMP/libmetal. |
VCK5000 works great with a few tweaks. Thanks.
…On Mon, May 23, 2022 at 2:16 AM ZhenLei Xu ***@***.***> wrote:
have not tested it. We are currently bring
how is it now?
—
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYWKQPPYC7TOQCYOM4UWXMLVLNEGFANCNFSM5MGMFXLQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Woo, great! how to compile? how to set LibXAIE path? Thanks!
|
https://github.com/nqdtan/vck5000_vivado_custom_ulp_design has excellent
documentation. I needed to rename "data_mover_mm2mm" to
"data_mover_mm2mm:data_mover_mm2mm" in line 42 of host.cpp. The xrt::ip
call in line 991 in mlir-aie/runtime_lib/test_library.cpp needs the same
change. Line 990 in test_library.cpp needs to point to the ulp.xclbin from
the vck5000_vivado_custom_ulp_design/host_sw_with_aie folder.
…On Wed, May 25, 2022 at 7:48 PM ZhenLei Xu ***@***.***> wrote:
git clone https://github.com/Xilinx/cmakeModules
git clone https://github.com/Xilinx/mlir-aie
mkdir build; cd build
cmake -GNinja \
-DLLVM_DIR=${absolute path to LLVMBUILD}/lib/cmake/llvm \
-DMLIR_DIR=${absolute path to LLVMBUILD}/lib/cmake/mlir \
-DLibXAIE_DIR=${absolute path to LibXAIE} \
-DCMAKE_MODULE_PATH=${absolute path to cmakeModules}/ \
-DVitisSysroot=${SYSROOT} \
-DCMAKE_BUILD_TYPE=Debug \
..
ninja; ninja check-aie; ninja mlir-doc; ninja install
Woo, great! how to compile? how to set LibXAIE path? Thanks!
—
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYWKQPJTLJ23SN63MPKJNCDVL3RBTANCNFSM5MGMFXLQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
thanks, I try it! |
The mods should be in common.cpp not test_library.cpp. Also, aie-reset
doesn't currently work for the VCK5000 as it tries to open /dev/mem instead
of going through data_mover-mm2mm.
…On Thu, May 26, 2022 at 8:04 AM Snow Goose ***@***.***> wrote:
https://github.com/nqdtan/vck5000_vivado_custom_ulp_design has excellent
documentation. I needed to rename "data_mover_mm2mm" to
"data_mover_mm2mm:data_mover_mm2mm" in line 42 of host.cpp. The xrt::ip
call in line 991 in mlir-aie/runtime_lib/test_library.cpp needs the same
change. Line 990 in test_library.cpp needs to point to the ulp.xclbin from
the vck5000_vivado_custom_ulp_design/host_sw_with_aie folder.
On Wed, May 25, 2022 at 7:48 PM ZhenLei Xu ***@***.***>
wrote:
> git clone https://github.com/Xilinx/cmakeModules
> git clone https://github.com/Xilinx/mlir-aie
> mkdir build; cd build
> cmake -GNinja \
> -DLLVM_DIR=${absolute path to LLVMBUILD}/lib/cmake/llvm \
> -DMLIR_DIR=${absolute path to LLVMBUILD}/lib/cmake/mlir \
> -DLibXAIE_DIR=${absolute path to LibXAIE} \
> -DCMAKE_MODULE_PATH=${absolute path to cmakeModules}/ \
> -DVitisSysroot=${SYSROOT} \
> -DCMAKE_BUILD_TYPE=Debug \
> ..
> ninja; ninja check-aie; ninja mlir-doc; ninja install
>
> Woo, great! how to compile? how to set LibXAIE path? Thanks!
>
> —
> Reply to this email directly, view it on GitHub
> <#77 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AYWKQPJTLJ23SN63MPKJNCDVL3RBTANCNFSM5MGMFXLQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
From https://github.com/nqdtan/mlir-aie.git set the following environment variables before running cmake: export LIBXAIENGINEV1_PATH=/path/embeddedsw/XilinxProcessorIPLib/drivers/aiengine |
Is this custom design necessary to use the AIEs on the VCK5000 through PCIe? Do we have official support for this nowadays? I've run into an issue because I only have access to the xdma platform, whereas this solution is based on qdma. |
Looking into this with #570 @eddierichter-amd |
I only have a VCK5000 board but you built and test the project on VCK190. Will it work correctly if I follow your workflow on VCK5000?
The text was updated successfully, but these errors were encountered: