Skip to content

Commit

Permalink
Add wmem to all the tests and make it necessary (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukamac authored Dec 11, 2024
1 parent a8e4ec1 commit 4ffdc0e
Show file tree
Hide file tree
Showing 122 changed files with 244 additions and 121 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

### Changed

- the `wmem` field in the test configurations is now required
- `ne16_task_init` got split into smaller parts: `ne16_task_init`, `ne16_task_set_op_to_conv`, `ne16_task_set_weight_offset`, `ne16_task_set_bits`, `ne16_task_set_norm_quant`
- strides in `ne16_task_set_strides`, `ne16_task_set_dims`, and `ne16_task_set_ptrs` are now strides between consecutive elements in that dimension
- `ne16_task_queue_size` is now `NE16_TASK_QUEUE_SIZE`
Expand Down
2 changes: 1 addition & 1 deletion test/NnxTestClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NnxTestConf(BaseModel):
has_norm_quant: bool
has_bias: bool
has_relu: bool
wmem: WmemLiteral = "tcdm"
wmem: WmemLiteral

@model_validator(mode="after") # type: ignore
def check_valid_depthwise_channels(self) -> NnxTestConf:
Expand Down
5 changes: 4 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ def pytest_generate_tests(metafunc):
test.save_data(test_dir)
nnxTestAndNames.append((test, test_dir))
except pydantic.ValidationError as e:
_ = e
for error in e.errors():
if error["type"] == "missing":
raise e

nnxTestAndNames.append(
pytest.param(
(None, test_dir),
Expand Down
3 changes: 2 additions & 1 deletion test/tests/test_0/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_1/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_10/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_100/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": true
"has_relu": true,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_101/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": true
"has_relu": true,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_102/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": true
"has_relu": true,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_103/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": true
"has_relu": true,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_104/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": true
"has_relu": true,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_105/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": true
"has_relu": true,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_106/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_107/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_108/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_109/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_11/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_110/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_111/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_112/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_113/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_114/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_115/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": false,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_116/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_117/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_118/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"bias_type": "int32",
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_12/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_13/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_14/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_15/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_16/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_17/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_18/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_19/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_2/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_20/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_21/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_22/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_23/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_24/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_25/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_26/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": true,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_27/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
3 changes: 2 additions & 1 deletion test/tests/test_28/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
},
"has_norm_quant": true,
"has_bias": false,
"has_relu": false
"has_relu": false,
"wmem": "tcdm"
}
Loading

0 comments on commit 4ffdc0e

Please sign in to comment.