Skip to content

Commit 425a29b

Browse files
committed
Update fuzz test to match the mmd version update PR test update
1 parent f1dc6fe commit 425a29b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

fuzz_testing/test/acl_hal_fuzz_test.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static int acl_test_svm_memory_support =
3030
(CL_DEVICE_SVM_COARSE_GRAIN_BUFFER | CL_DEVICE_SVM_FINE_GRAIN_BUFFER |
3131
CL_DEVICE_SVM_FINE_GRAIN_SYSTEM);
3232
static bool acl_test_physical_memory_support = true;
33+
static bool acl_test_buffer_location_support = true;
3334

3435
// Parts of a valid HAL.
3536
void acltest_hal_init_device(const acl_system_def_t *def);
@@ -81,6 +82,8 @@ int acltest_hal_set_profile_stop_cycle(unsigned int physical_device_id,
8182
unsigned int accel_id, uint64_t value);
8283
int acl_test_hal_has_svm_support(unsigned int physical_device_id, int *value);
8384
int acl_test_hal_has_physical_mem(unsigned int physical_device_id);
85+
int acl_test_hal_support_buffer_location(
86+
const std::vector<cl_device_id> &devices);
8487
int acl_test_hal_pll_reconfigure(unsigned int physical_device_id,
8588
const char *pll_settings_str);
8689
void acl_test_hal_reset_kernels(cl_device_id device);
@@ -128,6 +131,7 @@ static const acl_hal_t simple_hal = {acltest_hal_init_device,
128131
acltest_hal_set_profile_stop_cycle,
129132
acl_test_hal_has_svm_support,
130133
acl_test_hal_has_physical_mem,
134+
acl_test_hal_support_buffer_location,
131135
0,
132136
acl_test_hal_pll_reconfigure,
133137
acl_test_hal_reset_kernels,
@@ -589,6 +593,10 @@ void acl_test_hal_set_physical_memory_support(bool value) {
589593
acl_test_physical_memory_support = value;
590594
}
591595

596+
void acl_test_hal_set_buffer_location_support(bool value) {
597+
acl_test_buffer_location_support = value;
598+
}
599+
592600
int acl_test_hal_has_svm_support(unsigned int physical_device_id, int *value) {
593601
physical_device_id = physical_device_id; // Avoid Windows warning
594602
*value = acl_test_svm_memory_support;
@@ -600,6 +608,11 @@ int acl_test_hal_has_physical_mem(unsigned int physical_device_id) {
600608
return acl_test_physical_memory_support;
601609
}
602610

611+
int acl_test_hal_support_buffer_location(
612+
const std::vector<cl_device_id> &devices) {
613+
return acl_test_buffer_location_support;
614+
}
615+
603616
int acl_test_hal_pll_reconfigure(unsigned int physical_device_id,
604617
const char *pll_settings_str) {
605618
physical_device_id = physical_device_id;

fuzz_testing/test/acl_hal_fuzz_test.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void *acltest_translate_device_address(const void *device_ptr, size_t offset);
1616

1717
void acl_test_hal_set_svm_memory_support(int value);
1818
void acl_test_hal_set_physical_memory_support(bool value);
19+
void acl_test_hal_set_buffer_location_support(bool value);
1920

2021
extern bool acltest_hal_emulate_device_mem;
2122

0 commit comments

Comments
 (0)