Skip to content

Commit

Permalink
Make WASM work.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryscan committed May 12, 2024
1 parent 383cd55 commit 44d3384
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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.8"
version = "0.8.9"

[dependencies]
ahash = "0.8"
Expand Down
8 changes: 4 additions & 4 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, Maintain, PipelineLayoutDescriptor,
PowerPreference, Queue, RequestAdapterOptions, ShaderModuleDescriptor,
DeviceDescriptor, Features, Instance, Limits, PipelineLayoutDescriptor, PowerPreference, Queue,
RequestAdapterOptions, ShaderModuleDescriptor,
};

use crate::tensor::{
Expand All @@ -22,7 +22,7 @@ pub trait InstanceExt {
fn adapter(
&self,
power_preference: PowerPreference,
) -> impl Future<Output = Result<Adapter, CreateEnvironmentError>> + Send;
) -> impl Future<Output = Result<Adapter, CreateEnvironmentError>>;
}

impl InstanceExt for Instance {
Expand Down Expand Up @@ -71,7 +71,7 @@ impl Drop for Context {
fn drop(&mut self) {
if Arc::strong_count(&self.0) <= 1 {
self.queue.submit(None);
self.device.poll(Maintain::Wait);
self.device.poll(wgpu::Maintain::Wait);
}
}
}
Expand Down

0 comments on commit 44d3384

Please sign in to comment.