Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryscan committed Aug 17, 2024
1 parent 7428d28 commit 4c5bcbe
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 20 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ keywords = ["deep-learning", "language", "model", "rwkv"]
license = "MIT OR Apache-2.0"
name = "web-rwkv"
repository = "https://github.com/cryscan/web-rwkv"
version = "0.8.17"
version = "0.8.18"

[dependencies]
ahash = "0.8"
anyhow = "1.0"
bytemuck = { version = "1.13", features = ["extern_crate_alloc"] }
derive-getters = "0.4"
derive-getters = "0.5"
document-features = "0.2.8"
flume = "0.11.0"
futures = "0.3"
Expand All @@ -37,11 +37,11 @@ tracing-tracy = { version = "0.11.0", optional = true }
trait-variant = "0.1"
uid = "0.1"
wasm-bindgen = "0.2"
wgpu = "0.20.1"
wgpu = "22.1.0"

[dependencies.web-rwkv-derive]
path = "crates/web-rwkv-derive"
version = "0.2.4"
version = "0.2.5"

[dependencies.tokio]
default-features = false
Expand All @@ -55,10 +55,10 @@ memmap2 = "0.9"
tokio = { version = "1.37", features = ["full"] }
# wgpu-profiler = "0.14.1"
clap = { version = "4.3", features = ["derive"] }
crossterm = "0.27"
crossterm = "0.28"
dialoguer = "0.11.0"
pollster = "0.3.0"
ratatui = { version = "0.26", features = ["all-widgets"] }
ratatui = { version = "0.28", features = ["all-widgets"] }
simple_logger = { version = "5.0.0", features = ["stderr"] }

[features]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-rwkv-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["deep-learning", "language", "model", "rwkv"]
license = "MIT OR Apache-2.0"
name = "web-rwkv-derive"
repository = "https://github.com/cryscan/web-rwkv"
version = "0.2.4"
version = "0.2.5"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
6 changes: 3 additions & 3 deletions crates/web-rwkv-derive/src/serde/bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ pub fn with_bound(

fn visit_type(&mut self, ty: &'ast syn::Type) {
match ty {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
syn::Type::Array(ty) => self.visit_type(&ty.elem),
syn::Type::BareFn(ty) => {
for arg in &ty.inputs {
Expand Down Expand Up @@ -196,7 +196,7 @@ pub fn with_bound(
syn::PathArguments::AngleBracketed(arguments) => {
for arg in &arguments.args {
match arg {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
syn::GenericArgument::Type(arg) => self.visit_type(arg),
syn::GenericArgument::AssocType(arg) => self.visit_type(&arg.ty),
syn::GenericArgument::Lifetime(_)
Expand Down Expand Up @@ -225,7 +225,7 @@ pub fn with_bound(

fn visit_type_param_bound(&mut self, bound: &'ast syn::TypeParamBound) {
match bound {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
syn::TypeParamBound::Trait(bound) => self.visit_path(&bound.path),
syn::TypeParamBound::Lifetime(_) | syn::TypeParamBound::Verbatim(_) => {}
_ => {}
Expand Down
3 changes: 1 addition & 2 deletions crates/web-rwkv-derive/src/serde/internals/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ pub enum Identifier {
}

impl Identifier {
#[cfg(feature = "deserialize_in_place")]
pub fn is_some(self) -> bool {
match self {
Identifier::No => false,
Expand Down Expand Up @@ -1813,7 +1812,7 @@ fn borrowable_lifetimes(

fn collect_lifetimes(ty: &syn::Type, out: &mut BTreeSet<syn::Lifetime>) {
match ty {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
syn::Type::Slice(ty) => {
collect_lifetimes(&ty.elem, out);
}
Expand Down
8 changes: 4 additions & 4 deletions crates/web-rwkv-derive/src/serde/internals/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl ReplaceReceiver<'_> {

fn visit_type_mut_impl(&mut self, ty: &mut Type) {
match ty {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
Type::Array(ty) => {
self.visit_type_mut(&mut ty.elem);
self.visit_expr_mut(&mut ty.len);
Expand Down Expand Up @@ -178,7 +178,7 @@ impl ReplaceReceiver<'_> {
PathArguments::AngleBracketed(arguments) => {
for arg in &mut arguments.args {
match arg {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
GenericArgument::Type(arg) => self.visit_type_mut(arg),
GenericArgument::AssocType(arg) => self.visit_type_mut(&mut arg.ty),
GenericArgument::Lifetime(_)
Expand Down Expand Up @@ -207,7 +207,7 @@ impl ReplaceReceiver<'_> {

fn visit_type_param_bound_mut(&mut self, bound: &mut TypeParamBound) {
match bound {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
TypeParamBound::Trait(bound) => self.visit_path_mut(&mut bound.path),
TypeParamBound::Lifetime(_) | TypeParamBound::Verbatim(_) => {}
_ => {}
Expand All @@ -228,7 +228,7 @@ impl ReplaceReceiver<'_> {
if let Some(where_clause) = &mut generics.where_clause {
for predicate in &mut where_clause.predicates {
match predicate {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
#![cfg_attr(all(test), deny(non_exhaustive_omitted_patterns))]
WherePredicate::Type(predicate) => {
self.visit_type_mut(&mut predicate.bounded_ty);
for bound in &mut predicate.bounds {
Expand Down
2 changes: 1 addition & 1 deletion examples/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ where
loop {
#[cfg(not(debug_assertions))]
terminal.draw(|frame| {
let size = frame.size();
let size = frame.area();

let block = Block::default().black();
frame.render_widget(block, size);
Expand Down
2 changes: 1 addition & 1 deletion examples/rt-batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ async fn main() -> Result<()> {
loop {
#[cfg(not(debug_assertions))]
terminal.draw(|frame| {
let size = frame.size();
let size = frame.area();

let block = Block::default().black();
frame.render_widget(block, size);
Expand Down
6 changes: 4 additions & 2 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use wgpu::{
util::{BufferInitDescriptor, DeviceExt},
Adapter, BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, Buffer,
BufferDescriptor, BufferUsages, ComputePipeline, ComputePipelineDescriptor, Device,
DeviceDescriptor, Features, Instance, Limits, PipelineLayoutDescriptor, PowerPreference, Queue,
RequestAdapterOptions, ShaderModuleDescriptor,
DeviceDescriptor, Features, Instance, Limits, MemoryHints, PipelineLayoutDescriptor,
PowerPreference, Queue, RequestAdapterOptions, ShaderModuleDescriptor,
};

use crate::tensor::{
Expand Down Expand Up @@ -118,6 +118,7 @@ impl<'a> ContextBuilder {
label: None,
required_features: features,
required_limits: limits,
memory_hints: MemoryHints::Performance,
},
None,
)
Expand Down Expand Up @@ -286,6 +287,7 @@ impl ContextInternal {
module,
entry_point,
compilation_options: Default::default(),
cache: None,
});
let layout = pipeline.get_bind_group_layout(0);
CachedPipeline { pipeline, layout }
Expand Down
1 change: 1 addition & 0 deletions src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ impl<R: Reader> ModelBuilder<R> {
/// Create a model state.
/// - `num_batch`: The maximum number of runtime slots.
/// - `chunk_size`: Internally, the state is split into chunks of layers, since there is a size limit on one GPU buffer (128 MB).
///
/// If there is only one batch, it is recommended to set `chunk_size` to `info.num_layers()`.
pub struct StateBuilder {
context: Context,
Expand Down

0 comments on commit 4c5bcbe

Please sign in to comment.