Skip to content

[VitisAI] Add vaip Integration Using FetchContent (Cherry-pick of PR#22038 to win-ort-main branch)#23608

Merged
wonchung-microsoft merged 10 commits intowin-ort-mainfrom
user/wonchung/fetch_content_vitisai_ep
Feb 10, 2025
Merged

[VitisAI] Add vaip Integration Using FetchContent (Cherry-pick of PR#22038 to win-ort-main branch)#23608
wonchung-microsoft merged 10 commits intowin-ort-mainfrom
user/wonchung/fetch_content_vitisai_ep

Conversation

@wonchung-microsoft
Copy link
Contributor

Description

Integrating the VitisAI EP implement repository into ONNXRuntime using FetchContent.
Statically linking core EP functionality and limiting dynamic links to C-style ABI functions.

This is a cherry-pick of PR#22038

Motivation and Context

Addressing ABI and build compatibility ensures smoother integration and broader applicability of the VitisAI EP.

While PR#22038 is waiting to be merged to main branch, we want to utilize Vitis AI EP in win-ort-main branch. This cherry-pick was ok-ed by AMD.

wcy123 and others added 9 commits February 6, 2025 16:48
update to use integrated vaip

update vaip as the single entry point for cmake

add dummy vaip_xcompile_run.

onnxruntime_vitisia_ep.dll is optional.

vaip_xcompiler_compile maybe nullptr.

update create_ep_context_nodes.
fix compile error

move configuration to vaip

update vaip repo remote url

add vaip_get_default_config API

move pattern zoo to internal (#1)

* move pattern zoo to internal

* change external vaip

---------

Co-authored-by: mingyue <[email protected]>
Co-authored-by: mingyue <[email protected]>

add get_patterrn_list API and change get_pattern API (#2)

* add get_patterrn_list API and change get_pattern API

* lintrunner -a

---------

Co-authored-by: mingyue <[email protected]>
Co-authored-by: mingyue <[email protected]>

change xcompiler_compile API by CPS (#3)

Co-authored-by: mingyue <[email protected]>

[deps] change vaip remote and branch

Add vaip_get/has_mem_xclbin APIs (#4)

* Add vaip_get/has_mem_xclbin APIs

---------

Co-authored-by: mingyue <[email protected]>

vaip point to github/amd

use main branch
cmake/deps.txt Outdated
cudnn_frontend;https://github.com/NVIDIA/cudnn-frontend/archive/refs/tags/v1.7.0.zip;d0753d8d5b39947ca0729d7773cb84653a129eb1
dawn;https://github.com/google/dawn/archive/12a3b24c456cebd9fd11f23ac0164f78129b00c6.zip;ad428f6dc16f1336d584f7bad5714e1097dafc43
kleidiai;https://gitlab.arm.com/kleidi/kleidiai/-/archive/d15722976120710080ca098fe8ddabf4556cb40f/kleidiai-d15722976120710080ca098fe8ddabf4556cb40f.zip;d6c840d00c3b05aedf06e957ddaece1013d1f40b
vaip;https://github.com/amd/vaip.git;main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should put a fixed git commit id, or git tag in the second part.
The third part is a the sha1sum of file downloaded from the second part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

endif(MSVC)

if(MSVC)
target_link_options(onnxruntime_providers_vitisai PRIVATE "/NODEFAULTLIB:libucrt.lib" "/DEFAULTLIB:ucrt.lib")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this line is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote from AMD regarding this:

Linking Hybrid CRT is intended to optimize resource management and improve performance. Hybrid CRT (C Runtime) may combine different runtime libraries to optimize specific computational tasks, reduce unnecessary overhead, and potentially allow better memory management.
Among the models we support, some invoke custom ops implemented on the CPU. In our experiments, /MT + Hybrid CRT achieves the best performance.

I believe this is primarily for performance after AMD's internal experiments with vaip.

@wonchung-microsoft wonchung-microsoft changed the title [VitisAI] Add vaip Integration Using FetchContent (Cherry-pick of PR#22038 to main branch) [VitisAI] Add vaip Integration Using FetchContent (Cherry-pick of PR#22038 to win-ort-main branch) Feb 7, 2025
@wonchung-microsoft wonchung-microsoft merged commit 480bcdf into win-ort-main Feb 10, 2025
42 of 46 checks passed
@wonchung-microsoft wonchung-microsoft deleted the user/wonchung/fetch_content_vitisai_ep branch February 10, 2025 21:51
ashrit-ms added a commit that referenced this pull request Mar 17, 2025
…k of PR#22038 to win-ort-main branch) (#23608)"

This reverts commit 480bcdf.
ashrit-ms added a commit that referenced this pull request Mar 17, 2025
### Description
This change reverts the following PRs made to win-ort-main
0420687 Update win-ort-main to tip main 250211 (#23646)
480bcdf [VitisAI] Add vaip Integration Using FetchContent
(Cherry-pick of PR#22038 to win-ort-main branch) (#23608)
4b5b5f7 Update win-ort-main to tip main 250123 (#23473)
df87317 Update win-ort-main to tip main 250116 (#23398)

and cherry-picks commits between 6806174 to e0b66ca

---------

Signed-off-by: Junze Wu <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jianhui Dai <[email protected]>
Signed-off-by: Michael Tyler <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: liqunfu <[email protected]>
Co-authored-by: Yifan Li <[email protected]>
Co-authored-by: Yueqing Zhang <[email protected]>
Co-authored-by: Yueqing Zhang <[email protected]>
Co-authored-by: Changming Sun <[email protected]>
Co-authored-by: Yulong Wang <[email protected]>
Co-authored-by: Jiajia Qin <[email protected]>
Co-authored-by: Wu, Junze <[email protected]>
Co-authored-by: Jian Chen <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Wanming Lin <[email protected]>
Co-authored-by: Matthieu Darbois <[email protected]>
Co-authored-by: Prathik Rao <[email protected]>
Co-authored-by: wonchung-microsoft <[email protected]>
Co-authored-by: Vincent Wang <[email protected]>
Co-authored-by: PARK DongHa <[email protected]>
Co-authored-by: Hector Li <[email protected]>
Co-authored-by: Sam Webster <[email protected]>
Co-authored-by: Adrian Lizarraga <[email protected]>
Co-authored-by: Preetha Veeramalai <[email protected]>
Co-authored-by: jatinwadhwa921 <[email protected]>
Co-authored-by: Satya Kumar Jandhyala <[email protected]>
Co-authored-by: Corentin Maravat <[email protected]>
Co-authored-by: Xiaoyu <[email protected]>
Co-authored-by: Tianlei Wu <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jie Chen <[email protected]>
Co-authored-by: Jianhui Dai <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
Co-authored-by: Baiju Meswani <[email protected]>
Co-authored-by: kunal-vaishnavi <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Ted Themistokleous <[email protected]>
Co-authored-by: Jeff Daily <[email protected]>
Co-authored-by: Artur Wojcik <[email protected]>
Co-authored-by: Ted Themistokleous <[email protected]>
Co-authored-by: Xinya Zhang <[email protected]>
Co-authored-by: ikalinic <[email protected]>
Co-authored-by: sstamenk <[email protected]>
Co-authored-by: Yi-Hong Lyu <[email protected]>
Co-authored-by: Ti-Tai Wang <[email protected]>
Co-authored-by: Peishen Yan <[email protected]>
Co-authored-by: Dwayne Robinson <[email protected]>
Co-authored-by: Adrian Lizarraga <[email protected]>
Co-authored-by: Alexis Tsogias <[email protected]>
Co-authored-by: junchao-zhao <[email protected]>
Co-authored-by: sushraja-msft <[email protected]>
Co-authored-by: Caroline Zhu <[email protected]>
Co-authored-by: Grégoire <[email protected]>
Co-authored-by: Jing Fang <[email protected]>
Co-authored-by: Yateng Hong <[email protected]>
Co-authored-by: Michael Sharp <[email protected]>
Co-authored-by: Malik Shahzad Muzaffar <[email protected]>
Co-authored-by: Dmitri Smirnov <[email protected]>
Co-authored-by: Karim Vadsariya <[email protected]>
Co-authored-by: Lei Cao <[email protected]>
Co-authored-by: Karim Vadsariya <[email protected]>
Co-authored-by: Takeshi Watanabe <[email protected]>
Co-authored-by: Xavier Dupré <[email protected]>
Co-authored-by: George Wu <[email protected]>
Co-authored-by: Xinpeng Dou <[email protected]>
Co-authored-by: Jambay Kinley <[email protected]>
Co-authored-by: Gavin Kinsey <[email protected]>
Co-authored-by: Jon Campbell <[email protected]>
Co-authored-by: Joshua Lochner <[email protected]>
Co-authored-by: Ankit Maheshkar <[email protected]>
Co-authored-by: jatinwadhwa921 <[email protected]>
Co-authored-by: saurabh <[email protected]>
Co-authored-by: TejalKhade28 <[email protected]>
Co-authored-by: sfatimar <[email protected]>
Co-authored-by: Javier E. Martinez <[email protected]>
Co-authored-by: Eric Crawford <[email protected]>
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Co-authored-by: shaoboyan091 <[email protected]>
Co-authored-by: David Hotham <[email protected]>
Co-authored-by: Guenther Schmuelling <[email protected]>
Co-authored-by: Enrico Galli <[email protected]>
Co-authored-by: amarin16 <[email protected]>
Co-authored-by: xieofxie <[email protected]>
Co-authored-by: hualxie <[email protected]>
Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: David Fan <[email protected]>
Co-authored-by: Bilyana Indzheva <[email protected]>
Co-authored-by: Michael Tyler <[email protected]>
Co-authored-by: Ranjit Ranjan <[email protected]>
Co-authored-by: liqun Fu <[email protected]>
Co-authored-by: n1harika <[email protected]>
Co-authored-by: rayngun <[email protected]>
Co-authored-by: Surendar Rama Sitaraman <[email protected]>
Co-authored-by: Chi Lo <[email protected]>
Co-authored-by: Ashish Garg <[email protected]>
Co-authored-by: Ashish Garg <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants