Skip to content
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 Larod #120

Draft
wants to merge 55 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
151cd8c
Add larod-sys crate
JsGjKJzi Oct 25, 2024
8d3defa
Add bindings.
JsGjKJzi Oct 25, 2024
709d58c
Drop back to ACAP SDK 1.3. Get larod crate fleshed out a little to do…
JsGjKJzi Oct 26, 2024
e158693
Swap back to x86_64
JsGjKJzi Oct 28, 2024
024e491
Start implementing LarodMap
JsGjKJzi Oct 28, 2024
56d3720
Implement get_string, get_int_arr2, get_int_arr4.
JsGjKJzi Oct 29, 2024
51e2518
Merge remote-tracking branch 'origin/main' into feature/larod
JsGjKJzi Oct 29, 2024
3d510b6
- Improved error handling to always deallocate a larodError object if…
JsGjKJzi Oct 30, 2024
3e004a0
Added builder pattern for LarodClient.
JsGjKJzi Oct 30, 2024
021ea65
Add log.
JsGjKJzi Oct 31, 2024
f9e0506
Start adding LarodDevice and Session
JsGjKJzi Oct 31, 2024
c05a0a1
Add remote testing
JsGjKJzi Nov 2, 2024
e0fa140
Hide on-device tests behind a device-tests feature
JsGjKJzi Nov 2, 2024
147e438
Inverted remote-test.sh check for CARGO_TEST_CAMERA definition
JsGjKJzi Nov 2, 2024
32db020
Update larod_sys/src/bindings.rs to match new enum style.
JsGjKJzi Nov 4, 2024
b3607bf
Change to EnumVariation::Rust as default bindgen enum style.
JsGjKJzi Nov 6, 2024
a5d62d5
Improve error handling and add documentation
JsGjKJzi Nov 6, 2024
4309ed6
Fix test failure due to renamed method.
JsGjKJzi Nov 6, 2024
de2367b
Remove note that is no longer needed.
JsGjKJzi Nov 6, 2024
1dc6896
Run executable is no camera.
JsGjKJzi Nov 6, 2024
55a7158
Explicitly tie the lifetime of LarodDevice to the lifetime of the Ses…
JsGjKJzi Nov 7, 2024
b294ca3
Don't copy larodDevice data from C to Rust, just provide access via f…
JsGjKJzi Nov 9, 2024
bdeda81
Unwrap result for test listing devices.
JsGjKJzi Nov 9, 2024
1eb3252
Make LarodDevice.get_name() and LarodDevice.get_instance() public.
JsGjKJzi Nov 9, 2024
7941c92
Align getters/setters with RFC344.
JsGjKJzi Nov 9, 2024
59b9ac5
Fix getter names missed in previous commit.
JsGjKJzi Nov 9, 2024
4373b18
Start stubbing LarodModel.
JsGjKJzi Nov 9, 2024
cdaf42b
Remove `bin` crate type from [[example]]
JsGjKJzi Nov 15, 2024
ff868cb
Stub out Tensor struct.
JsGjKJzi Nov 15, 2024
0382a94
Add LarodModel Trait
JsGjKJzi Dec 3, 2024
c03e898
Merge branch 'main' into feature/larod
JsGjKJzi Dec 3, 2024
300af7e
Explicitly use height and width parameters for setting sizes.
JsGjKJzi Dec 17, 2024
4b2f2cb
Implement Send and Sync for LarodError.
JsGjKJzi Dec 18, 2024
486757a
Rename LarodModel.start() to LarodModel.start_job().
JsGjKJzi Dec 18, 2024
714a8bd
Add env_logger as dev dependency for printing data during test.
JsGjKJzi Dec 18, 2024
60b770f
Merge branch 'main' into feature/larod
JsGjKJzi Dec 19, 2024
ec86ed3
Delete remote-test.sh in root directory.
JsGjKJzi Dec 19, 2024
2380e9c
Remove default build target.
JsGjKJzi Dec 19, 2024
c3a87f4
Implement iterating over `Tensors` pointed to by `LarodTensorContainer`.
JsGjKJzi Dec 19, 2024
ae1384c
Add compiler failure tests.
JsGjKJzi Dec 19, 2024
0eea902
Update larod basic example.
JsGjKJzi Dec 19, 2024
d6a0e22
Merge branch 'main' into feature/larod
JsGjKJzi Dec 31, 2024
63e4875
Clean up a few lints for unused results and imports.
JsGjKJzi Dec 31, 2024
9be7b76
Implement iterating over Tensors.
JsGjKJzi Dec 31, 2024
65de920
Update basic example for iterating over tensors.
JsGjKJzi Dec 31, 2024
682cb21
Add anyhow development dependency for basic example.
JsGjKJzi Dec 31, 2024
670fb23
Update cargo lock file for anyhow dependency.
JsGjKJzi Dec 31, 2024
845fadb
Implement ops::Deref for LarodTensorContainer<'a> for Target = [Tenso…
JsGjKJzi Jan 2, 2025
44e00d7
Implement ops::DerefMut for LarodTensorContainer<'a> for Target = [Te…
JsGjKJzi Jan 2, 2025
620808d
Add memory mapped buffer for Tensor.
JsGjKJzi Jan 2, 2025
fff440f
Use file, not self.buffer when setting buffer on Tensor.
JsGjKJzi Jan 2, 2025
9c96b53
Create model outputs.
JsGjKJzi Jan 2, 2025
295dfc8
Add JobRequest struct from larodCreateJobRequest.
JsGjKJzi Jan 2, 2025
90430cc
Add missing lifetime parameters.
JsGjKJzi Jan 7, 2025
6aa9c1e
Add InferenceModel job creation.
JsGjKJzi Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ licensekey = { path = "crates/licensekey" }
licensekey-sys = { path = "crates/licensekey-sys" }
mdb = { path = "crates/mdb" }
mdb-sys = { path = "crates/mdb-sys" }
larod = { path = "crates/larod" }
larod-sys = { path = "crates/larod-sys" }

[workspace.package]
edition = "2021"
Expand Down
11 changes: 11 additions & 0 deletions crates/larod-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
build = "build.rs"
name = "larod-sys"
version = "0.1.0"
edition.workspace = true

[build-dependencies]
bindgen = { workspace = true }
pkg-config = { workspace = true }

[dependencies]
26 changes: 26 additions & 0 deletions crates/larod-sys/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use std::{env, path};

fn populated_bindings(dst: &path::PathBuf) {
let library = pkg_config::Config::new().probe("liblarod").unwrap();
let mut bindings = bindgen::Builder::default()
.header("wrapper.h")
.allowlist_recursively(false)
.allowlist_function("^(larod.*)$")
.allowlist_type("^(_?larod.*)$")
.default_enum_style(bindgen::EnumVariation::Rust {
non_exhaustive: true,
})
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.layout_tests(false);
for path in library.include_paths {
bindings = bindings.clang_args(&["-F", path.to_str().unwrap()]);
}
bindings.generate().unwrap().write_to_file(dst).unwrap();
}

fn main() {
let dst = path::PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs");
if env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default() != "x86_64" {
populated_bindings(&dst);
}
}
Loading