Skip to content

Commit

Permalink
Merge branch 'main' into fp16_bruteforce
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Jun 8, 2023
2 parents 0c937a9 + 1011f8e commit 0625ef6
Show file tree
Hide file tree
Showing 68 changed files with 3,550 additions and 6,835 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang"
add_cxx_flag_if_supported(-Wall)
# Suppress warnings that currently trigger on the code base.
# This list should shrink over time when warnings are fixed.
add_cxx_flag_if_supported(-Wno-unused-but-set-variable)
add_cxx_flag_if_supported(-Wno-sometimes-uninitialized)
add_cxx_flag_if_supported(-Wno-sign-compare)
endif()
add_cxx_flag_if_supported(-Wno-narrowing)
Expand Down
1 change: 0 additions & 1 deletion presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ cmake .. -G Ninja \
-DBUILD_WSI_XLIB_SUPPORT=OFF \
-DBUILD_WSI_XCB_SUPPORT=OFF \
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
-DUSE_GAS=OFF \
-C helper.cmake ..
cmake --build . -j2

Expand Down
2 changes: 2 additions & 0 deletions test_conformance/SVM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ set(${MODULE_NAME}_SOURCES
test_migrate.cpp
)

set_gnulike_module_compile_flags("-Wno-sometimes-uninitialized")

include(../CMakeCommon.txt)
36 changes: 23 additions & 13 deletions test_conformance/allocations/allocation_execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,30 @@ int check_image(cl_command_queue queue, cl_mem mem) {
return -1;
}

if (type == CL_MEM_OBJECT_BUFFER) {
log_error("Expected image object, not buffer.\n");
return -1;
} else if (type == CL_MEM_OBJECT_IMAGE2D) {
error = clGetImageInfo(mem, CL_IMAGE_WIDTH, sizeof(width), &width, NULL);
if (error) {
print_error(error, "clGetMemObjectInfo failed for CL_IMAGE_WIDTH.");
return -1;
}
error = clGetImageInfo(mem, CL_IMAGE_HEIGHT, sizeof(height), &height, NULL);
if (error) {
print_error(error, "clGetMemObjectInfo failed for CL_IMAGE_HEIGHT.");
switch (type)
{
case CL_MEM_OBJECT_BUFFER:
log_error("Expected image object, not buffer.\n");
return -1;
}
case CL_MEM_OBJECT_IMAGE2D:
error = clGetImageInfo(mem, CL_IMAGE_WIDTH, sizeof(width), &width,
NULL);
if (error)
{
print_error(error,
"clGetMemObjectInfo failed for CL_IMAGE_WIDTH.");
return -1;
}
error = clGetImageInfo(mem, CL_IMAGE_HEIGHT, sizeof(height),
&height, NULL);
if (error)
{
print_error(error,
"clGetMemObjectInfo failed for CL_IMAGE_HEIGHT.");
return -1;
}
break;
default: log_error("unexpected object type"); return -1;
}


Expand Down
25 changes: 15 additions & 10 deletions test_conformance/api/test_null_buffer_arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,21 @@ static int test_setargs_and_execution(cl_command_queue queue, cl_kernel kernel,
cl_int status;
const char *typestr;

if (type == NON_NULL_PATH) {
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), &test_buf);
typestr = "non-NULL";
} else if (type == ADDROF_NULL_PATH) {
test_buf = NULL;
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), &test_buf);
typestr = "&NULL";
} else if (type == NULL_PATH) {
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), NULL);
typestr = "NULL";
switch (type)
{
case NON_NULL_PATH:
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), &test_buf);
typestr = "non-NULL";
break;
case ADDROF_NULL_PATH:
test_buf = NULL;
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), &test_buf);
typestr = "&NULL";
break;
case NULL_PATH:
status = clSetKernelArg(kernel, 0, sizeof(cl_mem), NULL);
typestr = "NULL";
break;
}

log_info("Testing setKernelArgs with %s buffer.\n", typestr);
Expand Down
8 changes: 3 additions & 5 deletions test_conformance/atomics/test_indexed_cases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
int number_of_bins = number_of_items / divisor;
int max_counts_per_bin = divisor * 2;

int fail = 0;
int err;

clProgramWrapper program;
Expand Down Expand Up @@ -345,7 +344,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
{
log_error("add_index_bin_test FAILED to set kernel arguments: %d\n",
err);
fail = 1;
return -1;
}

Expand All @@ -354,7 +352,7 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
if (err)
{
log_error("add_index_bin_test FAILED to execute kernel: %d\n", err);
fail = 1;
return -1;
}

cl_int *final_bin_assignments =
Expand All @@ -372,7 +370,7 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
if (err)
{
log_error("add_index_bin_test FAILED to read back bins: %d\n", err);
fail = 1;
return -1;
}

cl_int *final_bin_counts =
Expand All @@ -390,7 +388,7 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
{
log_error("add_index_bin_test FAILED to read back bin_counters: %d\n",
err);
fail = 1;
return -1;
}

// Verification.
Expand Down
4 changes: 3 additions & 1 deletion test_conformance/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(${MODULE_NAME}_SOURCES
test_multireadimageonefmt.cpp test_multireadimagemultifmt.cpp
test_imagedim.cpp
test_vloadstore.cpp
test_int2float.cpp test_float2int.cpp
test_int2float.cpp
test_createkernelsinprogram.cpp
test_hostptr.cpp
test_explicit_s2v.cpp
Expand Down Expand Up @@ -70,4 +70,6 @@ if(APPLE)
list(APPEND ${MODULE_NAME}_SOURCES test_queue_priority.cpp)
endif(APPLE)

set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")

include(../CMakeCommon.txt)
Loading

0 comments on commit 0625ef6

Please sign in to comment.