Skip to content

Commit b216b82

Browse files
committed
add unsafe block to nnapi retrieve
1 parent 18bee40 commit b216b82

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ custos-macro = {git = "https://github.com/elftausend/custos-macro", optional=tru
3131
libm = { version="0.2.6", optional = true }
3232

3333
ash = { version = "0.37", optional = true }
34-
naga = { version = "0.14", features = ["wgsl-in", "spv-out"], optional = true }
34+
naga = { version = "0.19", features = ["wgsl-in", "spv-out"], optional = true }
3535

3636
half = {version = "2.3", default-features = false, optional = true}
3737

@@ -49,7 +49,7 @@ min-cl = { git = "https://github.com/elftausend/min-cl", optional = true }
4949
# min-cl = { version = "0.3.0", optional=true }
5050

5151
[features]
52-
default = ["opencl", "lazy"]
52+
default = ["opencl", "lazy", "nnapi"]
5353
# default = ["cpu", "lazy", "static-api", "graph", "autograd", "fork", "serde", "json"]
5454

5555
cpu = []

src/devices/nnapi/nnapi_device.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<U, Mods: Retrieve<Self, T, S>, T: AsOperandCode, S: Shape> Retriever<T, S>
105105
len: usize,
106106
parents: impl crate::Parents<NUM_PARENTS>,
107107
) -> Buffer<T, Self, S> {
108-
let data = self.modules.retrieve::<NUM_PARENTS>(self, len, parents);
108+
let data = unsafe { self.modules.retrieve::<NUM_PARENTS>(self, len, parents) };
109109
let buf = Buffer {
110110
data,
111111
device: Some(self),

0 commit comments

Comments
 (0)