Skip to content

Commit

Permalink
fix(sys): link xnnpack microkernels
Browse files Browse the repository at this point in the history
why
  • Loading branch information
decahedron1 committed Oct 23, 2024
1 parent 2628378 commit 585efda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ort-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,11 @@ fn prepare_libort_dir() -> (PathBuf, bool) {
optional_link_lib(&lib_dir, "onnxruntime_providers_rknpu");
optional_link_lib(&lib_dir, "onnxruntime_providers_tvm");
if optional_link_lib(&lib_dir, "onnxruntime_providers_xnnpack") {
add_search_dir(transform_dep(external_lib_dir.join("googlexnnpack-build"), &profile));
let xnnpack_build_dir = transform_dep(external_lib_dir.join("googlexnnpack-build"), &profile);
add_search_dir(&xnnpack_build_dir);
println!("cargo:rustc-link-lib=static=XNNPACK");
optional_link_lib(&xnnpack_build_dir, "microkernels-prod");

add_search_dir(transform_dep(external_lib_dir.join("pthreadpool-build"), &profile));
println!("cargo:rustc-link-lib=static=pthreadpool");
}
Expand Down

0 comments on commit 585efda

Please sign in to comment.