-
Notifications
You must be signed in to change notification settings - Fork 6
Add Larod #120
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
Open
JsGjKJzi
wants to merge
77
commits into
AxisCommunications:main
Choose a base branch
from
JsGjKJzi:feature/larod
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Larod #120
Changes from 14 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
151cd8c
Add larod-sys crate
JsGjKJzi 8d3defa
Add bindings.
JsGjKJzi 709d58c
Drop back to ACAP SDK 1.3. Get larod crate fleshed out a little to do…
JsGjKJzi e158693
Swap back to x86_64
JsGjKJzi 024e491
Start implementing LarodMap
JsGjKJzi 56d3720
Implement get_string, get_int_arr2, get_int_arr4.
JsGjKJzi 51e2518
Merge remote-tracking branch 'origin/main' into feature/larod
JsGjKJzi 3d510b6
- Improved error handling to always deallocate a larodError object if…
JsGjKJzi 3e004a0
Added builder pattern for LarodClient.
JsGjKJzi 021ea65
Add log.
JsGjKJzi f9e0506
Start adding LarodDevice and Session
JsGjKJzi c05a0a1
Add remote testing
JsGjKJzi e0fa140
Hide on-device tests behind a device-tests feature
JsGjKJzi 147e438
Inverted remote-test.sh check for CARGO_TEST_CAMERA definition
JsGjKJzi 32db020
Update larod_sys/src/bindings.rs to match new enum style.
JsGjKJzi b3607bf
Change to EnumVariation::Rust as default bindgen enum style.
JsGjKJzi a5d62d5
Improve error handling and add documentation
JsGjKJzi 4309ed6
Fix test failure due to renamed method.
JsGjKJzi de2367b
Remove note that is no longer needed.
JsGjKJzi 1dc6896
Run executable is no camera.
JsGjKJzi 55a7158
Explicitly tie the lifetime of LarodDevice to the lifetime of the Ses…
JsGjKJzi b294ca3
Don't copy larodDevice data from C to Rust, just provide access via f…
JsGjKJzi bdeda81
Unwrap result for test listing devices.
JsGjKJzi 1eb3252
Make LarodDevice.get_name() and LarodDevice.get_instance() public.
JsGjKJzi 7941c92
Align getters/setters with RFC344.
JsGjKJzi 59b9ac5
Fix getter names missed in previous commit.
JsGjKJzi 4373b18
Start stubbing LarodModel.
JsGjKJzi cdaf42b
Remove `bin` crate type from [[example]]
JsGjKJzi ff868cb
Stub out Tensor struct.
JsGjKJzi 0382a94
Add LarodModel Trait
JsGjKJzi c03e898
Merge branch 'main' into feature/larod
JsGjKJzi 300af7e
Explicitly use height and width parameters for setting sizes.
JsGjKJzi 4b2f2cb
Implement Send and Sync for LarodError.
JsGjKJzi 486757a
Rename LarodModel.start() to LarodModel.start_job().
JsGjKJzi 714a8bd
Add env_logger as dev dependency for printing data during test.
JsGjKJzi 60b770f
Merge branch 'main' into feature/larod
JsGjKJzi ec86ed3
Delete remote-test.sh in root directory.
JsGjKJzi 2380e9c
Remove default build target.
JsGjKJzi c3a87f4
Implement iterating over `Tensors` pointed to by `LarodTensorContainer`.
JsGjKJzi ae1384c
Add compiler failure tests.
JsGjKJzi 0eea902
Update larod basic example.
JsGjKJzi d6a0e22
Merge branch 'main' into feature/larod
JsGjKJzi 63e4875
Clean up a few lints for unused results and imports.
JsGjKJzi 9be7b76
Implement iterating over Tensors.
JsGjKJzi 65de920
Update basic example for iterating over tensors.
JsGjKJzi 682cb21
Add anyhow development dependency for basic example.
JsGjKJzi 670fb23
Update cargo lock file for anyhow dependency.
JsGjKJzi 845fadb
Implement ops::Deref for LarodTensorContainer<'a> for Target = [Tenso…
JsGjKJzi 44e00d7
Implement ops::DerefMut for LarodTensorContainer<'a> for Target = [Te…
JsGjKJzi 620808d
Add memory mapped buffer for Tensor.
JsGjKJzi fff440f
Use file, not self.buffer when setting buffer on Tensor.
JsGjKJzi 9c96b53
Create model outputs.
JsGjKJzi 295dfc8
Add JobRequest struct from larodCreateJobRequest.
JsGjKJzi 90430cc
Add missing lifetime parameters.
JsGjKJzi 6aa9c1e
Add InferenceModel job creation.
JsGjKJzi 36eb55a
implement more Tensor methods
JsGjKJzi 96b2918
implement compile time definition of inference backend
JsGjKJzi 98dbb90
rewind Tensor file descriptors
JsGjKJzi 0b43dd0
merge main into feature/larod
JsGjKJzi c62919c
suppress name format lints
JsGjKJzi f58fd53
add file access constants missed by bindgen
JsGjKJzi 67f1602
add fd_offset getter for Tensor
JsGjKJzi e19217a
add documentation
JsGjKJzi b80c40b
add simple inference example
JsGjKJzi e378419
add more functions
JsGjKJzi 56f42f6
fix a few missed things in last commit
JsGjKJzi b196e7e
incorporate clippy::pedantic lints
JsGjKJzi f3f7adb
add remaining functions, add documentation, fix clippy lints
JsGjKJzi 2a0642f
adjust crate top level documentation
JsGjKJzi 01f4966
re-export FDAccessFlag
JsGjKJzi 43ed182
document session drop
JsGjKJzi 8453d8f
add licenses
JsGjKJzi 96b0917
add newlines at end of files
JsGjKJzi 3b28782
update crate versions to 0.0.0
JsGjKJzi 79f6a7e
use NewType enums
JsGjKJzi 547bf88
move custom code out of larod-sys
JsGjKJzi 10ab960
alphabetize Cargo.toml
JsGjKJzi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 @@ | ||
[build] | ||
target = "aarch64-unknown-linux-gnu" | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
runner = ["/workspaces/acap-rs/remote-test.sh"] |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,11 @@ | ||
[package] | ||
build = "build.rs" | ||
name = "larod-sys" | ||
version = "0.1.0" | ||
edition.workspace = true | ||
|
||
JsGjKJzi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[build-dependencies] | ||
bindgen = { workspace = true } | ||
pkg-config = { workspace = true } | ||
|
||
[dependencies] |
This file contains hidden or 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,23 @@ | ||
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.*)$") | ||
.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); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.