Skip to content

Commit

Permalink
Merge pull request #194 from SludgePhD/wgpu-18
Browse files Browse the repository at this point in the history
Update to wgpu 0.18
  • Loading branch information
pixelspark authored Nov 7, 2023
2 parents ec54ef7 + 2252866 commit 0c56190
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 31 deletions.
131 changes: 105 additions & 26 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion wonnx-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protobuf = { version = "2.27.1", features = ["with-bytes"] }
structopt = { version = "0.3.26", features = ["paw"] }
thiserror = "1.0.31"
tract-onnx = { version = "0.19.12", optional = true }
wgpu = "0.17.1"
wgpu = "0.18.0"
wonnx = { version = "^0.5.1" }
wonnx-preprocessing = { version = "^0.5.1" }
human_bytes = "0.4.1"
Expand Down
1 change: 1 addition & 0 deletions wonnx-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ async fn run() -> Result<(), NNXError> {
let instance_descriptor = wgpu::InstanceDescriptor {
backends,
dx12_shader_compiler: wgpu::Dx12Compiler::Fxc,
..Default::default()
};
let instance = wgpu::Instance::new(instance_descriptor);
let adapters = instance.enumerate_adapters(wgpu::Backends::all());
Expand Down
1 change: 0 additions & 1 deletion wonnx-preprocessing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ protobuf = { version = "2.27.1", features = ["with-bytes"] }
thiserror = "1.0.31"
tokenizers = "0.13.3"
tract-onnx = { version = "0.19.2", optional = true }
wgpu = "0.17.1"
wonnx = { version = "^0.5.1" }
serde_json = "^1.0"
bytemuck = "1.9.1"
Expand Down
2 changes: 1 addition & 1 deletion wonnx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exclude = [
]

[dependencies]
wgpu = "0.17.1"
wgpu = "0.18.0"
bytemuck = { version = "1.9.1", features = ["extern_crate_alloc"] }
protobuf = { version = "2.27.1", features = ["with-bytes"] }
log = "0.4.17"
Expand Down
3 changes: 1 addition & 2 deletions wonnx/src/gpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,7 @@ impl GpuStep {
..
} => {
// Encode a command for invocation of a shader.
let mut compute_pass =
encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: None });
let mut compute_pass = encoder.begin_compute_pass(&Default::default());
compute_pass.set_pipeline(pipeline);
for (index, bind_group) in bind_groups.iter().enumerate() {
compute_pass.set_bind_group(index as u32, bind_group, &[]);
Expand Down
1 change: 1 addition & 0 deletions wonnx/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub async fn request_device_queue() -> (wgpu::Device, wgpu::Queue) {
let instance_descriptor = wgpu::InstanceDescriptor {
backends,
dx12_shader_compiler: wgpu::Dx12Compiler::Fxc,
..Default::default()
};
let instance = wgpu::Instance::new(instance_descriptor);
let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None)
Expand Down

0 comments on commit 0c56190

Please sign in to comment.