-
Notifications
You must be signed in to change notification settings - Fork 7
Testing: Dynamic enablement/disablement of backends #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
a7ce502
6086baa
81a73c2
ad176c3
cccbb9d
47c4db9
3ae360d
9ce6fa7
ec8c763
770050c
bfaa660
f13fa3f
d966d1d
b8d9396
a83d6a3
1e3f70a
f4139a3
69bb16f
3c912b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||||||||||||||||||||||
| /* Copyright (c) Advanced Micro Devices, Inc. All rights reserved. | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * SPDX-License-Identifier: MIT | ||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| #pragma once | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| // When testing it is sometimes inconvenient if a variable is statically initialized. | ||||||||||||||||||||||||||
| // Declaring a variable as STATIC will result in the variable being static only | ||||||||||||||||||||||||||
| // when tests are not being built. | ||||||||||||||||||||||||||
| #ifdef AIS_TESTING | ||||||||||||||||||||||||||
| #define STATIC | ||||||||||||||||||||||||||
| #else | ||||||||||||||||||||||||||
| #define STATIC static | ||||||||||||||||||||||||||
|
Comment on lines
+9
to
+14
|
||||||||||||||||||||||||||
| // Declaring a variable as STATIC will result in the variable being static only | |
| // when tests are not being built. | |
| #ifdef AIS_TESTING | |
| #define STATIC | |
| #else | |
| #define STATIC static | |
| // Declaring a variable as AIS_STATIC will result in the variable being static only | |
| // when tests are not being built. | |
| #ifdef AIS_TESTING | |
| #define AIS_STATIC | |
| #else | |
| #define AIS_STATIC static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fastpath::score()now checksContext<Configuration>::get()->fastpath(), but because it usesaccept_io &= ...it will still evaluate all subsequent conditions (and call intofile/buffer) even when fastpath is disabled. This adds unnecessary work and can trigger side effects in helpers/mocks. Consider early-returning-1when fastpath is disabled, or rewriting the logic to use short-circuiting&&checks.