Skip to content
Snippets Groups Projects
Commit 3e1cf7b0 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

add test_override

parent 958a499f
No related branches found
No related tags found
1 merge request!442Refactor Configuration API
Pipeline #72315 passed
......@@ -136,3 +136,26 @@ def test_config_validation():
cfg.index_field = Field.create_generic(
"idx", spatial_dimensions=1, field_type=FieldType.GENERIC
)
def test_override():
cfg1 = CreateKernelConfig()
cfg1.function_name = "test"
cfg1.cpu.openmp.schedule = "dynamic"
cfg1.gpu.manual_launch_grid = False
cfg1.allow_double_writes = True
cfg2 = CreateKernelConfig()
cfg2.function_name = "func"
cfg2.cpu.openmp.schedule = "static(5)"
cfg2.cpu.vectorize.lanes = 12
cfg2.allow_double_writes = False
cfg1.override(cfg2)
assert cfg1.function_name == "func"
assert cfg1.cpu.openmp.schedule == "static(5)"
assert cfg1.cpu.openmp.enable is None
assert cfg1.cpu.vectorize.lanes == 12
assert cfg1.cpu.vectorize.assume_aligned is None
assert cfg1.allow_double_writes is False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment