Skip to content

Commit

Permalink
Merge branch 'main' into fill_images_version_check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreelakshmi Haridas Maruthur authored Dec 3, 2024
2 parents abea311 + 0a1456d commit cd5e8bc
Show file tree
Hide file tree
Showing 276 changed files with 7,059 additions and 2,295 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Arm and AArch64 compilers
if: ${{ matrix.arch == 'arm' || matrix.arch == 'aarch64' }}
run: |
sudo apt-get update
sudo apt-get install -y \
gcc-12-arm-linux-gnueabihf g++-12-arm-linux-gnueabihf \
gcc-12-aarch64-linux-gnu g++-12-aarch64-linux-gnu
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-12 12
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-g++ arm-linux-gnueabihf-g++ /usr/bin/arm-linux-gnueabihf-g++-12 12
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-12 12
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-12 12
- name: Setup OpenGL build dependencies
if: ${{ matrix.gl }}
run: |
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang"
# Enable more warnings if not doing a release build.
add_cxx_flag_if_supported(-Wall)
endif()
add_cxx_flag_if_supported(-Wno-narrowing)
add_cxx_flag_if_supported(-Wno-format)
add_cxx_flag_if_supported(-Wno-error=cpp) # Allow #warning directive
add_cxx_flag_if_supported(-Wno-unknown-pragmas) # Issue #785
Expand Down Expand Up @@ -153,8 +152,14 @@ if(MSVC)
endif()

if( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qlong-double -Qpc80 /DWIN32 /D_WINDOWS /W3 /GR /EHsc -nologo -Od -D_CRT_NONSTDC_NO_WARNINGS -EHsc -Wall -Qdiag-disable:68,111,177,186,161,869,1028,2259,2553,181,239,265,1188 -fp:strict -fp:source")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qlong-double -Qpc80 /DWIN32 /D_WINDOWS /W3 /GR /EHsc -nologo -Od -D_CRT_NONSTDC_NO_WARNINGS -EHsc -Wall -Qdiag-disable:68,111,177,186,161,869,1028,2259,2553,181,239,265,1188 -fp:strict -fp:source")
set(Shared_Flags_Intel "-Qlong-double -Qpc80 /DWIN32 /D_WINDOWS /W3 /GR /EHsc -nologo -Od -D_CRT_NONSTDC_NO_WARNINGS -EHsc -Wall -fp:strict")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Shared_Flags_Intel}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Shared_Flags_Intel}")
if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM"))
set(ICC_Extra_Flags "-Qdiag-disable:68,111,177,186,161,869,1028,2259,2553,181,239,265,1188 -fp:source")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ICC_Extra_Flags}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ICC_Extra_Flags}")
endif()
endif()

# To handle addresses larger than 2 gigabytes for 32bit targets
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ require compilation, these are:

The Khronos [Conformance Process Document](https://members.khronos.org/document/dl/911)
details the steps required for a conformance submission.
In this repository [opencl_conformance_tests_full.csv](test_conformance/submission_details_template.txt)
In this repository [opencl_conformance_tests_full.csv](test_conformance/opencl_conformance_tests_full.csv)
defines the full list of tests which must be run for conformance. The output log
of which must be included alongside a filled in
[submission details template](test_conformance/submission_details_template.txt).
Expand Down
11 changes: 0 additions & 11 deletions presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ set -e

export TOP=$(pwd)

TOOLCHAIN_URL_arm="https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz"
TOOLCHAIN_URL_aarch64="https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz"

TOOLCHAIN_PREFIX_arm=arm-linux-gnueabihf
TOOLCHAIN_PREFIX_aarch64=aarch64-linux-gnu

Expand All @@ -20,14 +17,6 @@ echo

# Prepare toolchain if needed
if [[ ${JOB_ARCHITECTURE} != "" && ${RUNNER_OS} != "Windows" ]]; then
TOOLCHAIN_URL_VAR=TOOLCHAIN_URL_${JOB_ARCHITECTURE}
TOOLCHAIN_URL=${!TOOLCHAIN_URL_VAR}
wget ${TOOLCHAIN_URL}
TOOLCHAIN_ARCHIVE=${TOOLCHAIN_URL##*/}
tar xf ${TOOLCHAIN_ARCHIVE}
TOOLCHAIN_DIR=${TOP}/${TOOLCHAIN_ARCHIVE%.tar.xz}
export PATH=${TOOLCHAIN_DIR}/bin:${PATH}

TOOLCHAIN_PREFIX_VAR=TOOLCHAIN_PREFIX_${JOB_ARCHITECTURE}
TOOLCHAIN_PREFIX=${!TOOLCHAIN_PREFIX_VAR}

Expand Down
29 changes: 18 additions & 11 deletions test_common/gl/setup_osx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,28 @@

class OSXGLEnvironment : public GLEnvironment
{
public:
OSXGLEnvironment()
{
mCGLContext = NULL;
}
private:
bool mIsGlutInit;

public:
OSXGLEnvironment()
{
mCGLContext = NULL;
mIsGlutInit = false;
}

virtual int Init( int *argc, char **argv, int use_opengl_32 )
{
if (!use_opengl_32) {

// Create a GLUT window to render into
glutInit( argc, argv );
glutInitWindowSize( 512, 512 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "OpenCL <-> OpenGL Test" );
if (!mIsGlutInit)
{
// Create a GLUT window to render into
glutInit(argc, argv);
glutInitWindowSize(512, 512);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("OpenCL <-> OpenGL Test");
mIsGlutInit = true;
}
}

else {
Expand Down
23 changes: 9 additions & 14 deletions test_common/harness/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,19 @@ int feclearexcept(int excepts);

#if defined(__INTEL_COMPILER)
#include <mathimf.h>
#elif __cplusplus && defined(_MSC_VER)
#include <cmath>
#else
#include <math.h>
#endif

#ifdef __cplusplus
#include <cmath>
extern "C" {
using std::isfinite;
using std::isinf;
using std::isnan;
}
#endif

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
Expand All @@ -140,18 +147,6 @@ extern "C" {
#define INFINITY (FLT_MAX + FLT_MAX)
#endif

#ifndef isfinite
#define isfinite(x) _finite(x)
#endif

#ifndef isnan
#define isnan(x) ((x) != (x))
#endif

#ifndef isinf
#define isinf(_x) ((_x) == INFINITY || (_x) == -INFINITY)
#endif

#if _MSC_VER < 1900 && !defined(__INTEL_COMPILER)

double rint(double x);
Expand Down
10 changes: 10 additions & 0 deletions test_common/harness/errorHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ const char *IGetErrorString(int clErrorCode)
case CL_INVALID_SPEC_ID: return "CL_INVALID_SPEC_ID";
case CL_MAX_SIZE_RESTRICTION_EXCEEDED:
return "CL_MAX_SIZE_RESTRICTION_EXCEEDED";
case CL_INCOMPATIBLE_COMMAND_QUEUE_KHR:
return "CL_INCOMPATIBLE_COMMAND_QUEUE_KHR";
case CL_INVALID_SYNC_POINT_WAIT_LIST_KHR:
return "CL_INVALID_SYNC_POINT_WAIT_LIST_KHR";
case CL_INVALID_COMMAND_BUFFER_KHR:
return "CL_INVALID_COMMAND_BUFFER_KHR";
default: return "(unknown)";
}
}
Expand Down Expand Up @@ -190,6 +196,8 @@ const char *GetChannelTypeName(cl_channel_type type)
case CL_UNORM_SHORT_565: return "CL_UNORM_SHORT_565";
case CL_UNORM_SHORT_555: return "CL_UNORM_SHORT_555";
case CL_UNORM_INT_101010: return "CL_UNORM_INT_101010";
case CL_UNORM_INT_101010_2: return "CL_UNORM_INT_101010_2";
case CL_UNORM_INT_2_101010_EXT: return "CL_UNORM_INT_2_101010_EXT";
case CL_SIGNED_INT8: return "CL_SIGNED_INT8";
case CL_SIGNED_INT16: return "CL_SIGNED_INT16";
case CL_SIGNED_INT32: return "CL_SIGNED_INT32";
Expand Down Expand Up @@ -220,6 +228,8 @@ int IsChannelTypeSupported(cl_channel_type type)
case CL_UNORM_SHORT_565:
case CL_UNORM_SHORT_555:
case CL_UNORM_INT_101010:
case CL_UNORM_INT_101010_2:
case CL_UNORM_INT_2_101010_EXT:
case CL_SIGNED_INT8:
case CL_SIGNED_INT16:
case CL_SIGNED_INT32:
Expand Down
Loading

0 comments on commit cd5e8bc

Please sign in to comment.