-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Thanks for creating this repo. I was going through the puzzles via the provided Jupyter notebook and noticed I had to restart the kernel to get the puzzle output to change.
To reproduce:
- Set VERBOSE=1
- Solve Puzzle 1
Generated source code for map:
[[kernel]] void custom_kernel_map(
const constant int32_t* a [[buffer(0)]],
device float* out [[buffer(1)]],
uint3 thread_position_in_grid [[thread_position_in_grid]]) {
uint local_i = thread_position_in_grid.x;
// FILL ME IN (roughly 1 line)
out[local_i] = a[local_i] + 10;
}
Passed Tests!
- Update Puzzle to have an incorrect solution by adding 11 to each position instead of 10 and rerun the cells.
Generated source code for map:
[[kernel]] void custom_kernel_map(
const constant int32_t* a [[buffer(0)]],
device float* out [[buffer(1)]],
uint3 thread_position_in_grid [[thread_position_in_grid]]) {
uint local_i = thread_position_in_grid.x;
[//](https://github.com/abeleinin/Metal-Puzzles/issues/new) FILL ME IN (roughly 1 line)
out[local_i] = a[local_i] + 11;
}
Passed Tests!
Expected the test to fail, but the output still says that the tests passed. After restarting the kernel will the tests fail.
Generated source code for map:
[[kernel]] void custom_kernel_map(
const constant int32_t* a [[buffer(0)]],
device float* out [[buffer(1)]],
uint3 thread_position_in_grid [[thread_position_in_grid]]) {
uint local_i = thread_position_in_grid.x;
[//](https://github.com/abeleinin/Metal-Puzzles/issues/new) FILL ME IN (roughly 1 line)
out[local_i] = a[local_i] + 11;
}
Failed Tests.
Yours: array([11, 12, 13, 14], dtype=float32)
Spec : array([10, 11, 12, 13], dtype=int32)
Versions:
mlx==0.21.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels