Minor fixes to L0 blackbox tests

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2020-12-02 08:42:25 +00:00
committed by Compute-Runtime-Automation
parent 176154b9e6
commit b668feaf0d
4 changed files with 22 additions and 30 deletions

View File

@@ -61,7 +61,7 @@ void testAppendMemoryCopyFromHeapToDeviceToStack(ze_context_handle_t context, ze
}
void testAppendMemoryCopyFromHostToDeviceToStack(ze_context_handle_t context, ze_device_handle_t &device, bool &validRet) {
const size_t allocSize = 4096 + 7; // +7 to brake alignment and make it harder
const size_t allocSize = 4096 + 7; // +7 to break alignment and make it harder
char *hostBuffer;
void *zeBuffer = nullptr;
char stackBuffer[allocSize];
@@ -453,11 +453,12 @@ int main(int argc, char *argv[]) {
auto device = zelloInitContextAndGetDevices(context);
bool outputValidationSuccessful = false;
if (verbose) {
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << deviceProperties.name << std::endl;
}
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
testAppendMemoryCopyFromHeapToDeviceToStack(context, device, outputValidationSuccessful);
if (outputValidationSuccessful)
testAppendMemoryCopyFromHostToDeviceToStack(context, device, outputValidationSuccessful);

View File

@@ -367,14 +367,11 @@ int main(int argc, char *argv[]) {
ze_context_handle_t context = nullptr;
auto device = zelloInitContextAndGetDevices(context);
if (verbose) {
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << deviceProperties.name << std::endl;
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
}
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
bool result;
std::string currentTest;

View File

@@ -137,14 +137,11 @@ int main(int argc, char *argv[]) {
auto device = zelloInitContextAndGetDevices(context);
bool outputValidationSuccessful;
if (verbose) {
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << deviceProperties.name << std::endl;
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
}
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
executeGpuKernelAndValidate(context, device, outputValidationSuccessful);

View File

@@ -202,14 +202,11 @@ int main(int argc, char *argv[]) {
auto device = zelloInitContextAndGetDevices(context);
bool outputValidationSuccessful;
if (verbose) {
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << deviceProperties.name << std::endl;
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
}
ze_device_properties_t deviceProperties = {};
SUCCESS_OR_TERMINATE(zeDeviceGetProperties(device, &deviceProperties));
std::cout << "Device : \n"
<< " * name : " << deviceProperties.name << "\n"
<< " * vendorId : " << std::hex << deviceProperties.vendorId << "\n";
executeKernelAndValidate(context, device, outputValidationSuccessful);