Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Nov 24, 2024
1 parent 0fb8e51 commit 0e5c7ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
18 changes: 2 additions & 16 deletions ort-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
use std::{
<<<<<<< HEAD
env, fs,
env, fs, io,
path::{Path, PathBuf},
process::Command
||||||| parent of eb51646 (fix: concurrent downloads, ref #322)
env, fs,
path::{Path, PathBuf}
=======
env, fs, io,
path::{Path, PathBuf}
>>>>>>> eb51646 (fix: concurrent downloads, ref #322)
};

#[allow(unused)]
Expand Down Expand Up @@ -430,14 +422,8 @@ fn prepare_libort_dir() -> (PathBuf, bool) {
.join(target)
.join(prebuilt_hash);

<<<<<<< HEAD
let ort_extract_dir = prebuilt_url.split('/').last().unwrap().strip_suffix(".tgz").unwrap();
let lib_dir = cache_dir.join(ort_extract_dir);
||||||| parent of eb51646 (fix: concurrent downloads, ref #322)
let lib_dir = cache_dir.join(ORT_EXTRACT_DIR);
=======
let lib_dir = bin_extract_dir.join(ORT_EXTRACT_DIR);
>>>>>>> eb51646 (fix: concurrent downloads, ref #322)
let lib_dir = bin_extract_dir.join(ort_extract_dir);
if !lib_dir.exists() {
let downloaded_file = fetch_file(prebuilt_url);
assert!(verify_file(&downloaded_file, prebuilt_hash), "hash of downloaded ONNX Runtime binary does not match!");
Expand Down
7 changes: 0 additions & 7 deletions ort-sys/src/internal/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
use std::hash::{BuildHasher, Hasher, RandomState};

pub mod dirs;
<<<<<<< HEAD

#[cfg(feature = "download-binaries")]
include!(concat!(env!("OUT_DIR"), "/downloaded_version.rs"));
||||||| parent of eb51646 (fix: concurrent downloads, ref #322)
=======

pub fn random_identifier() -> String {
let mut state = RandomState::new().build_hasher().finish();
Expand All @@ -20,4 +14,3 @@ pub fn random_identifier() -> String {
.map(|i| b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[i as usize % 62] as char)
.collect()
}
>>>>>>> eb51646 (fix: concurrent downloads, ref #322)
3 changes: 3 additions & 0 deletions ort-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#[doc(hidden)]
pub mod internal;

#[cfg(feature = "download-binaries")]
include!(concat!(env!("OUT_DIR"), "/downloaded_version.rs"));

pub const ORT_API_VERSION: u32 = 17;

pub use std::ffi::{c_char, c_int, c_ulong, c_ulonglong, c_ushort, c_void};
Expand Down

0 comments on commit 0e5c7ab

Please sign in to comment.