-
Notifications
You must be signed in to change notification settings - Fork 112
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
Test parts of API with libFuzzer. #731
Conversation
Allows fetching and building level zero adapter without the need to use the entire SYCL codebase. Convenient for testing and prototyping of other language runtimes.
Update adapter branch with newer CUDA plugin version
[UR][HIP] Add ur hip target build
update sycl adapters tag and add adapter CI
This adds a version script to restrict visiblity of symbols in adapters. This is so that adapters don't use loader ur functions when populating proc tables...
8f53448
to
e1e279c
Compare
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.
This is a better approach, but we should expand the input grammar to cover more cases for these APIs.
uint32_t num_platforms = 0; | ||
uint32_t num_devices = 0; | ||
|
||
std::random_device rand_device; |
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.
tests should be fully deterministic, and the only source of randomness should be the fuzzer itself.
break; | ||
case UR_DEVICE_GET: | ||
if (!platforms.empty()) { | ||
std::uniform_int_distribution<unsigned> distrib( |
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.
the adapter identifier should come from the data.
[adapters] only export get proc table symbols in adapters
e1e279c
to
cf09145
Compare
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.
This is a good start, but right now the only thing that is being fuzzed is the sequence of operations. We need to allow the fuzzer to also parametrize these operations.
uint32_t num_adapters; | ||
uint32_t num_platforms; | ||
uint32_t num_devices; | ||
} TestState; |
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.
you never use this global.
c6b81f2
to
59aa08a
Compare
Use an absolute path instead of just the filename for the `ur_adapter_<name>.map` files to resolve `/usr/bin/ld: cannot open linker script file` errors.
…rs-map [ur] Fix adapters linker script path on Linux
test/fuzz/CMakeLists.txt
Outdated
"XPTI_SUBSCRIBERS=$<TARGET_FILE:collector>" | ||
"UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_null>\"" | ||
"UR_ENABLE_LAYERS=UR_LAYER_TRACING") | ||
target_compile_options(${TEST_TARGET_NAME} PRIVATE -g -fsanitize=fuzzer) |
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.
You use -fsanitize=fuzzer
here and in target_link_libraries
, is that intentional?
59aa08a
to
0fb9123
Compare
[UR] Implement CUDA native handle tests
[UR] Add license to missing files
[ADAPTERS] update to latest from sycl
2afa8f8
to
f960b6d
Compare
Co-authored-by: omar.ahmed@codeplay.com
f960b6d
to
1984c1d
Compare
Replaced by #795 targeting adapters branch. |
Add a fuzz test generating API calls. Related to #566 .