Skip to content

Commit

Permalink
Fixed speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jafioti committed Jan 29, 2024
1 parent 111452a commit 8dff361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compilers/metal/storage_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl Operator for AllocateMetalBuffers {
} else {
for (size, buffer) in self.buffer_sizes.iter().zip(buffers) {
let size = size.exec(dyn_map).unwrap() as u64;
if buffer.length() < size {
if buffer.length() < size || buffer.length() > size * 2 {
// TODO: For some reason this causes bad outputs. Maybe we are relying on buffer length somewhere? We shouldn't be.
// Also, it seems we are getting the benifits of this without actually doing it. Maybe metal is doing it in the background?
// Similar allocation strategy to Rust's Vec
Expand Down

0 comments on commit 8dff361

Please sign in to comment.