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

feat: onnx runtime shared sessions #430

Merged
merged 27 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bd2a99c
feat: improved `install_onnx` script
kallebysantos Jul 11, 2024
797709c
stamp: expose the received unix signal number when exiting
nyannyacha Jul 15, 2024
da4883a
chore: update dependencies
nyannyacha Jul 12, 2024
d67900a
stamp: init onnx runtime using `ctor`
nyannyacha Jul 5, 2024
5361bc4
stamp: don't propagate panic caused by library loading failure
nyannyacha Jul 12, 2024
b1451e0
fix(sb_ai): reflect upstream api changes
nyannyacha Oct 17, 2024
2e7ab58
chore: update `scripts/run_dind.sh`
nyannyacha Jul 30, 2024
717e6cf
chore(k6): bump k6 to 0.52.0
nyannyacha Aug 1, 2024
79af205
chore(k6): update `setup.sh`
nyannyacha Aug 1, 2024
6bdbde3
chore(k6): update `tsconfig.json`
nyannyacha Aug 1, 2024
085a510
chore(k6): add dependency
nyannyacha Aug 1, 2024
909a59f
chore(k6): update `package-lock.json`
nyannyacha Aug 1, 2024
2bb4fb5
fix(k6): make gte scenario more robustly
nyannyacha Aug 1, 2024
d743791
fix(k6): add a test for request cancelled to gte scenario
nyannyacha Aug 9, 2024
893ebb0
stamp: optimize pipeline loading
kallebysantos Oct 17, 2024
b0c8f6c
stamp: introduce session cleanup logic
nyannyacha Oct 27, 2024
185ffba
chore: update `examples/main.ts`
nyannyacha Aug 1, 2024
ce29ee9
stamp: move `DenoRuntimeDropToken` to `base_rt` crate
nyannyacha Aug 9, 2024
b167311
stamp: rename mod
nyannyacha Aug 9, 2024
6a41745
perf: makes run inference task in the blocking thread pool
nyannyacha Aug 9, 2024
4c986e3
stamp: polishing
nyannyacha Aug 15, 2024
a9f24ba
chore: update dependencies
nyannyacha Jul 12, 2024
faf7538
stamp: adjust cpu metrics guard
nyannyacha Aug 22, 2024
42f1ebd
stamp: clippy
kallebysantos Oct 28, 2024
8601949
feat: add GPU support
kallebysantos Oct 28, 2024
bfc3661
chore: apply format
nyannyacha Nov 1, 2024
53b2100
stamp: insert tracing macros at some points
nyannyacha Nov 1, 2024
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
Prev Previous commit
Next Next commit
stamp: move DenoRuntimeDropToken to base_rt crate
  • Loading branch information
nyannyacha authored and kallebysantos committed Oct 31, 2024
commit ce29ee9773da68f97b0d7d6b396c4e9be815dc1a
2 changes: 1 addition & 1 deletion crates/base/src/deno_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use futures_util::future::poll_fn;
use futures_util::task::AtomicWaker;
use log::{error, trace};
use once_cell::sync::{Lazy, OnceCell};
use sb_core::conn_sync::DenoRuntimeDropToken;
use base_rt::DenoRuntimeDropToken;
use sb_core::http::sb_core_http;
use sb_core::http_start::sb_core_http_start;
use sb_core::util::sync::AtomicFlag;
Expand Down
13 changes: 13 additions & 0 deletions crates/base_rt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::num::NonZeroUsize;

use once_cell::sync::Lazy;
use tokio_util::sync::CancellationToken;

pub mod error;

Expand Down Expand Up @@ -58,3 +59,15 @@ pub static USER_WORKER_RT: Lazy<tokio_util::task::LocalPoolHandle> = Lazy::new(|
)
})
});

#[derive(Clone)]
pub struct DenoRuntimeDropToken(pub CancellationToken);

impl std::ops::Deref for DenoRuntimeDropToken {
type Target = CancellationToken;

fn deref(&self) -> &Self::Target {
&self.0
}
}

3 changes: 0 additions & 3 deletions crates/sb_core/conn_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ impl ConnWatcher {
self.0.clone()
}
}

#[derive(Clone)]
pub struct DenoRuntimeDropToken(pub CancellationToken);
3 changes: 1 addition & 2 deletions crates/sb_core/net.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use base_rt::DenoRuntimeDropToken;
use deno_core::error::bad_resource;
use deno_core::error::AnyError;
use deno_core::op2;
Expand All @@ -20,8 +21,6 @@ use tokio_util::sync::CancellationToken;
use tracing::span;
use tracing::Level;

use crate::conn_sync::DenoRuntimeDropToken;

pub struct TokioDuplexResource {
id: usize,
rw: AsyncRefCell<io::DuplexStream>,
Expand Down