Closed baldand closed 2 years ago
Version: v0.2.0:
This kind of code does not work correctly:
import metalcompute as mc import numpy as np dev = Device() fn = dev.kernel(code).function(name) np_buf = np.zeros(1,dtype='f') np_buf[0] = 42 fn(count, np_buf, output_buf)
The kernel function does not see the value.
If a builtin array.array('f',[42]) is used instead, it works. Also if the np object is backed by a device.buffer, it works.
Resolved by PR #14 / v0.2.1
Version: v0.2.0:
This kind of code does not work correctly:
The kernel function does not see the value.
If a builtin array.array('f',[42]) is used instead, it works. Also if the np object is backed by a device.buffer, it works.