-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): Possibly fix build issue on windows devices
The halide_type_t_64.patch file was manually applied in the build.rs instead of using the diffy crate chore(tests): Added more tests for resizing and test cases where mnn segfaults if wrong input is given
- Loading branch information
1 parent
b54976f
commit 5cf6509
Showing
14 changed files
with
578 additions
and
63 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use divan::*; | ||
#[divan::bench_group(sample_size = 5, sample_count = 5)] | ||
mod mnn_realesr_bench_with_ones { | ||
use divan::*; | ||
use mnn::*; | ||
#[divan::bench] | ||
pub fn mnn_benchmark_cpu(bencher: Bencher) { | ||
let mut net = Interpreter::from_file("tests/assets/realesr.mnn").unwrap(); | ||
let mut config = ScheduleConfig::new(); | ||
config.set_type(ForwardType::CPU); | ||
let session = net.create_session(config).unwrap(); | ||
bencher.bench_local(|| { | ||
let mut input = net.input(&session, "data").unwrap(); | ||
input.fill(1f32); | ||
net.run_session(&session).unwrap(); | ||
}); | ||
} | ||
|
||
#[cfg(feature = "opencl")] | ||
#[divan::bench] | ||
pub fn mnn_benchmark_opencl(bencher: Bencher) { | ||
let mut net = Interpreter::from_file("tests/assets/realesr.mnn").unwrap(); | ||
let mut config = ScheduleConfig::new(); | ||
config.set_type(ForwardType::OpenCL); | ||
let session = net.create_session(config).unwrap(); | ||
bencher.bench_local(|| { | ||
let mut input = net.input(&session, "data").unwrap(); | ||
input.fill(1f32); | ||
net.run_session(&session).unwrap(); | ||
net.wait(&session); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule vendor
updated
10 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Oops, something went wrong.