Skip to content

Commit

Permalink
Scheduler: Enable import-chasing in scheduler tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange05 committed Mar 20, 2024
1 parent adb08bd commit ad4dde8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/test_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def fixture_config(here):
the file path
"""
default_config = {
'default': {'role': 'kernel', 'expand': True, 'strict': True},
'default': {'role': 'kernel', 'expand': True, 'strict': True, 'enable_imports': True},
'routines': {
'driverB': {'role': 'driver'},
}
Expand Down
3 changes: 2 additions & 1 deletion tests/test_lint/test_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ def output(self, handler_reports):
'role': 'kernel',
'expand': True,
'strict': False,
'block': ['compute_l2']
'block': ['compute_l2'],
'enable_imports': True,
},
'routines': routines
}
Expand Down
13 changes: 9 additions & 4 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def fixture_config():
'role': 'kernel',
'expand': True,
'strict': True,
'disable': ['abort']
'disable': ['abort'],
'enable_imports': True,
},
'routines': {}
}
Expand Down Expand Up @@ -995,15 +996,19 @@ def test_scheduler_dependencies_ignore(here, preprocess, frontend):
projB = here/'sources/projB'

configA = SchedulerConfig.from_dict({
'default': {'role': 'kernel', 'expand': True, 'strict': True},
'default': {
'role': 'kernel', 'expand': True, 'strict': True, 'enable_imports': True
},
'routines': {
'driverB': {'role': 'driver'},
'kernelB': {'ignore': ['ext_driver']},
}
})

configB = SchedulerConfig.from_dict({
'default': {'role': 'kernel', 'expand': True, 'strict': True},
'default': {
'role': 'kernel', 'expand': True, 'strict': True, 'enable_imports': True
},
'routines': {
'ext_driver': {'role': 'kernel'}
}
Expand Down Expand Up @@ -1387,7 +1392,7 @@ def test_scheduler_typebound(here, config, frontend, proj_typebound_dependencies

scheduler = Scheduler(
paths=proj, seed_routines=['driver'], config=config,
full_parse=False, frontend=frontend
full_parse=False, frontend=frontend,
)

assert set(scheduler.items) == set(proj_typebound_dependencies)
Expand Down
1 change: 1 addition & 0 deletions transformations/tests/test_data_offload.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def fixture_config():
'role': 'kernel',
'expand': True,
'strict': True,
'enable_imports': True,
},
}

Expand Down
13 changes: 9 additions & 4 deletions transformations/tests/test_pool_allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def test_pool_allocator_temporaries(frontend, generate_driver_stack, block_dim,
'role': 'kernel',
'expand': True,
'strict': True,
'enable_imports': True,
},
'routines': {
'driver': {'role': 'driver'}
Expand Down Expand Up @@ -505,7 +506,8 @@ def test_pool_allocator_temporaries_kernel_sequence(frontend, block_dim, directi
'mode': 'idem',
'role': 'kernel',
'expand': True,
'strict': True
'strict': True,
'enable_imports': True,
},
'routines': {
'driver': {'role': 'driver'}
Expand Down Expand Up @@ -789,7 +791,8 @@ def test_pool_allocator_temporaries_kernel_nested(frontend, block_dim, directive
'mode': 'idem',
'role': 'kernel',
'expand': True,
'strict': True
'strict': True,
'enable_imports': True,
},
'routines': {
'driver': {'role': 'driver', 'real_kind': 'jwrb'}
Expand Down Expand Up @@ -1020,7 +1023,8 @@ def test_pool_allocator_more_call_checks(frontend, block_dim, caplog):
'mode': 'idem',
'role': 'kernel',
'expand': True,
'strict': True
'strict': True,
'enable_imports': True,
},
'routines': {
'kernel': {}
Expand Down Expand Up @@ -1151,7 +1155,8 @@ def test_pool_allocator_args_vs_kwargs(frontend, block_dim):
'role': 'kernel',
'expand': True,
'strict': True,
'disable': ['parkind1']
'disable': ['parkind1'],
'enable_imports': True,
},
'routines': {
'driver': {'role': 'driver'}
Expand Down
1 change: 1 addition & 0 deletions transformations/tests/test_transform_derived_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def fixture_config():
'role': 'kernel',
'expand': True,
'strict': True,
'enable_imports': True,
},
'routines': {
'driver': {
Expand Down

0 comments on commit ad4dde8

Please sign in to comment.