Commit Graph

526 Commits

Author SHA1 Message Date
Wenju He
ef84736c73 Fix SVM if 64-bit atomic extensions are supported (#382)
Need to enable 64-bit atomic extensions in kernel source.
Use InterlockedCompareExchange64 for 64-bit type.
2019-07-24 18:54:50 +01:00
Wenju He
1d2e0ca248 Fix SVM if 64-bit atomic extensions are supported (#396)
Need to enable 64-bit atomic extensions in kernel source.
Use InterlockedCompareExchange64 for 64-bit type.
2019-07-24 18:54:20 +01:00
Wenju He
d7ff4aa502 SVM: use InterlockedCompareExchange64 for 64-bit type (#397) 2019-07-24 18:54:00 +01:00
Grzegorz Wawiorko
28cf6de10f cl20: Fix compilation in D3D cases (#394)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:21:00 +01:00
Grzegorz Wawiorko
9daeca00ea cl21: Fix compilation in D3D cases (#393)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:20:39 +01:00
Grzegorz Wawiorko
64dba66718 Fix compilation in D3D cases (#392)
* Fix compilation in D3D cases

* Use existing harness include search path.
2019-07-24 14:19:26 +01:00
aarongreig
d96c04ffb9 Use cl types in conversion reference functions. (#383) (#384)
These changes bring this code back in line with the 2.x branches.
2019-07-22 13:38:37 +01:00
Stuart Brady
912bfbe466 Split offline compilation into multiple functions 2019-07-19 10:47:32 +01:00
Stuart Brady
9c337d5f37 Refactor handling of device ID for offline compilation
This also cleans up error handling in get_device_address_bits().
2019-07-19 10:47:32 +01:00
Stuart Brady
979405d84d Fix error handling in create_single_kernel_helper() 2019-07-19 10:47:32 +01:00
Stuart Brady
9cfca7e69e Split offline compilation into multiple functions 2019-07-19 10:45:57 +01:00
Stuart Brady
fe3049a491 Refactor handling of device ID for offline compilation
This also cleans up error handling in get_device_address_bits().
2019-07-19 10:45:57 +01:00
aarongreig
d69c452a70 Update conversion test reference functions to use CL_CHAR_MIN instead of CHAR_MIN for clamping (#377) 2019-07-17 16:07:49 +01:00
Wenju He
702498b367 test_basic/progvar: fix 64bit atomic types error (#374)
Enable 64bit atomics extentions in order to use 64bit atomic types in
test_progvar_prog_scope_init and test_progvar_prog_scope_uninit.
2019-07-15 10:47:20 +01:00
Wenju He
ccadaf3c1d test_basic/progvar: fix 64bit atomic types error (#370)
Enable 64bit atomics extentions in order to use 64bit atomic types in
test_progvar_prog_scope_init and test_progvar_prog_scope_uninit.
2019-07-15 10:46:58 +01:00
Grzegorz Wawiorko
5e22db59ae cl20: Fix spirv path in bruteforce tests (#371)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places

* Specific fix for cl20_trunk branch
2019-07-10 13:57:16 +01:00
Grzegorz Wawiorko
4bd713856e cl21: Fix spirv path in bruteforce tests (#356)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places
2019-07-10 13:56:57 +01:00
Grzegorz Wawiorko
7ee74ae17f Fix spirv path in bruteforce tests (#357)
* Fix spirv path in bruteforce tests

* Compilation fix - align_malloc already defined in kernelHelpers.c

* Fix spirv path in bruteforce tests - more places
2019-07-10 13:56:38 +01:00
Grzegorz Wawiorko
00d0b0ddd7 Test fix - Test computeinfo should know each existing OCL version (#366) 2019-07-08 16:39:22 +01:00
Grzegorz Wawiorko
26777a0126 Test fix - Test computeinfo should know each existing OCL version (#367) 2019-07-08 16:39:01 +01:00
Grzegorz Wawiorko
c6f515c0d3 Test fix - Test computeinfo should know each existing OCL version (#368) 2019-07-08 16:38:49 +01:00
Stuart Brady
c45d5b6a20 Update command line parameters for offline compilation
This change simplifies the command line interface for controlling offline
compilation.  It replaces special command line syntax for controlling the
compilation cache for SPIR-V compilation, with generic command line
parameters that can now also be used for binary offline compilation.
2019-07-08 11:34:02 +01:00
Stuart Brady
6eec559ffd Rename gSpirVPath to gCompilationCachePath
gSpirVPath controls the location of the compilation cache for SPIR-V
offline compilation, but its use would also make sense for binary
offline compilation.  This change renames it to gCompilationCachePath.
2019-07-08 11:34:02 +01:00
Stuart Brady
0b1520f508 Refactor setting of compilation mode and cache mode
This change refactors the setting of the compilation mode, so that
instead of using a 'gOfflineCompiler' bool together with a
'gOfflineCompilerOutputType' enum, a single 'gCompilationMode' enum
is used.  The default value for gCompilationMode is 'kOnline', which
is equivalent to the previous defaulting of gOfflineCompiler to false.

In addition, it refactors the setting of the compilation cache mode,
so that instead of the 'gForceSpirVCache' and 'gForceSpirVGenerate'
bools, a single 'gCompilationCacheMode' enum is used.  The default
value for gCompilationCacheMode is 'kCacheModeCompileIfAbsent', which
is equivalent to the previous defaulting of both booleans to false.

This change also refactors create_openclcpp_program() to avoid saving
and restoring gOfflineCompiler and gOfflineCompilerOutputType.  Instead,
it now passes the desired compilation mode as a parameter.
2019-07-08 11:34:02 +01:00
Stuart Brady
543cbe769c Update command line parameters for offline compilation
This change simplifies the command line interface for controlling offline
compilation.  It replaces special command line syntax for controlling the
compilation cache for SPIR-V compilation, with generic command line
parameters that can now also be used for binary offline compilation.
2019-07-08 11:33:50 +01:00
Stuart Brady
f2f458b675 Rename gSpirVPath to gCompilationCachePath
gSpirVPath controls the location of the compilation cache for SPIR-V
offline compilation, but its name falsely implies that it is
SPIR-V specific.  This change renames it to gCompilationCachePath.
2019-07-08 11:33:50 +01:00
Stuart Brady
9be570cdf0 Refactor setting of compilation mode and cache mode
This change refactors the setting of the compilation mode, so that
instead of using a 'gOfflineCompiler' bool together with a
'gOfflineCompilerOutputType' enum, a single 'gCompilationMode' enum
is used.  The default value for gCompilationMode is 'kOnline', which
is equivalent to the previous defaulting of gOfflineCompiler to false.

In addition, it refactors the setting of the compilation cache mode,
so that instead of the 'gForceSpirVCache' and 'gForceSpirVGenerate'
bools, a single 'gCompilationCacheMode' enum is used.  The default
value for gCompilationCacheMode is 'kCacheModeCompileIfAbsent', which
is equivalent to the previous defaulting of both booleans to false.
2019-07-08 11:33:50 +01:00
Stuart Brady
814dd8adc0 Refactor code for getting CL_DEVICE_ADDRESS_BITS 2019-07-05 14:27:25 +01:00
Stuart Brady
36dfbd4162 Refactor is_extension_available()
This change splits up is_extension_available() so that the bulk of it
can be reused for fetching other items of variable-length device
information, such as CL_DEVICE_VERSION.
2019-07-05 14:27:25 +01:00
Stuart Brady
5438c664a1 Rename gOfflineCompilerInput/Output locals
These are local variables, and wrongly start with a "g" indicating that
they are globals.
2019-07-05 14:27:25 +01:00
Stuart Brady
ab36d94dd0 Reindent parameter parsing code 2019-07-05 14:27:25 +01:00
Stuart Brady
7486dd13ad Remove source transformation support
This change removes support for the "source" mode of offline compilation
which is commented with "to be removed in the future as we will use
offline compiler here".

The "source" mode allowed for the CL source to be transformed by
build_script_source.py and then passed to clCreateProgramWithSource(),
and appears to have been developed only for the purpose of testing the
offline compilation infrastructure.
2019-07-05 14:27:25 +01:00
Stuart Brady
8b34a55cfc Refactor code for getting CL_DEVICE_ADDRESS_BITS 2019-07-05 14:27:13 +01:00
Stuart Brady
e4cf3190b7 Refactor is_extension_available()
This change splits up is_extension_available() so that the bulk of it
can be reused for fetching other items of variable-length device
information, such as CL_DEVICE_VERSION.
2019-07-05 14:27:13 +01:00
Stuart Brady
5dfedb3d43 Rename gOfflineCompilerInput/Output locals
These are local variables, and wrongly start with a "g" indicating that
they are globals.
2019-07-05 14:27:13 +01:00
Stuart Brady
74f82665d0 Reindent parameter parsing code 2019-07-05 14:27:13 +01:00
Stuart Brady
90b0c52584 Remove source transformation support
This change removes support for the "source" mode of offline compilation
which is commented with "to be removed in the future as we will use
offline compiler here".

The "source" mode allowed for the CL source to be transformed by
build_script_source.py and then passed to clCreateProgramWithSource(),
and appears to have been developed only for the purpose of testing the
offline compilation infrastructure.
2019-07-05 14:27:13 +01:00
Stuart Brady
5a4a051206 Refactor is_extension_available()
This change splits up is_extension_available() so that the bulk of it
can be reused for fetching other items of variable-length device
information, such as CL_DEVICE_VERSION.
2019-07-05 11:39:48 +01:00
Stuart Brady
cc2f77b651 Fix formatting in parseParameters.cpp 2019-07-05 11:39:48 +01:00
Stuart Brady
ab9276b8c9 Refactor is_extension_available()
This change splits up is_extension_available() so that the bulk of it
can be reused for fetching other items of variable-length device
information, such as CL_DEVICE_VERSION.
2019-07-05 11:38:57 +01:00
Stuart Brady
82831127b9 Fix formatting in parseParameters.cpp 2019-07-05 11:38:57 +01:00
Wenju He
e1874ba732 c11_atomics: fix ambiguous call atomic_fetch_add (#354)
Cast operand type to AddSubOperandType.
2019-07-05 11:37:23 +01:00
Wenju He
e7586a7a78 c11_atomics: fix ambiguous call atomic_fetch_add (#361)
Cast operand type to AddSubOperandType.
2019-07-05 11:37:00 +01:00
Nikhil Joshi
6e29a04870 Fix enqueue_flags test to use correct barrier type. (#276)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:11:02 +01:00
Nikhil Joshi
d6e5f29e22 Fix enqueue_flags test to use correct barrier type. (#348)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:10:37 +01:00
Nikhil Joshi
9686ea098c Fix enqueue_flags test to use correct barrier type. (#349)
Currently, enqueue_flags test uses CLK_LOCAL_MEM_FENCE.
Use CLK_GLOBAL_MEM_FENCE instead as all threads across work-groups
need to wait here.
2019-07-03 14:10:26 +01:00
Grzegorz Wawiorko
6c4bd13baa Bruteforce tests - make compatibility to cl20_trunk branch (#320) 2019-07-03 12:22:33 +01:00
Grzegorz Wawiorko
7b711091ee Fix test_api - query for device extensions in queue hint test (#351) 2019-07-03 12:16:16 +01:00
Grzegorz Wawiorko
f7f6208f62 Fix test_api - query for device extensions in queue hint test (#352) 2019-07-03 12:16:05 +01:00
robquill
5fdacae98b Use slice pitch instead of row pitch for 1D arrays. (#313)
Fixes fill_image 1Darray
2019-06-18 10:28:46 +01:00