Skip to content

Commit 0549f3b

Browse files
authored
Fix Compilation Warnings (CNugteren#604)
* Fixed c_ld documentation. * Ran the generator script. * Added support for work group collective functions in xasum routine. * Added support for work group collective functions for xdot kernels. * Added support for work group collective functions for xnrm2 kernel. * Fixed duplicate storing of result. * Added subgroup level reduction support for xasum. * Removed repetition of if (lid == 0) in the epilogue kernel * Removed incorrectly placed comment. * Added subgroup support. * Added subgroup support for xnrm2. * Revert "Added subgroup support for xnrm2." This reverts commit 457338c. * Revert "Added subgroup support." This reverts commit d83ecb5. * Revert "Removed incorrectly placed comment." This reverts commit 0df27ff. * Revert "Removed repetition of if (lid == 0) in the epilogue kernel" This reverts commit 5cc5ca2. * Revert "Added subgroup level reduction support for xasum." This reverts commit 302f290. * Revert "Fixed duplicate storing of result." This reverts commit 1153d40. * Revert "Added support for work group collective functions for xnrm2 kernel." This reverts commit f96d076. * Revert "Added support for work group collective functions for xdot kernels." This reverts commit f4df321. * Revert "Added support for work group collective functions in xasum routine." This reverts commit 350e57a. * Fixed deprecation warnings and redefining warnings. * Updated generator script.
1 parent c22ee4d commit 0549f3b

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

include/clblast.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
#include <unordered_map> // For OverrideParameters function
1818

1919
// Includes the normal OpenCL C header
20+
#ifndef CL_TARGET_OPENCL_VERSION
21+
#define CL_TARGET_OPENCL_VERSION 110
22+
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings
23+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
24+
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // to disable deprecation warnings
25+
#elif defined(CL_TARGET_OPENCL_VERSION) && CL_TARGET_OPENCL_VERSION < 110
26+
#pragma warning "OpenCL Version must be at least 1.1 (110) to use CLBlast, redefining"
27+
#undef CL_TARGET_OPENCL_VERSION
28+
#define CL_TARGET_OPENCL_VERSION 110
29+
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings
30+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
31+
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // to disable deprecation warnings
32+
#endif
2033
#if defined(__APPLE__) || defined(__MACOSX)
2134
#include <OpenCL/opencl.h>
2235
#else

include/clblast_c.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
#define CLBLAST_CLBLAST_C_H_
1313

1414
// Includes the normal OpenCL C header
15+
#ifndef CL_TARGET_OPENCL_VERSION
16+
#define CL_TARGET_OPENCL_VERSION 110
17+
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings
18+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
19+
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // to disable deprecation warnings
20+
#elif defined(CL_TARGET_OPENCL_VERSION) && CL_TARGET_OPENCL_VERSION < 110
21+
#pragma warning "OpenCL Version must be at least 1.1 (110) to use CLBlast, redefining"
22+
#undef CL_TARGET_OPENCL_VERSION
23+
#define CL_TARGET_OPENCL_VERSION 110
24+
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings
25+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
26+
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // to disable deprecation warnings
27+
#endif
1528
#if defined(__APPLE__) || defined(__MACOSX)
1629
#include <OpenCL/opencl.h>
1730
#else

scripts/generator/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"/src/clblast_cuda.cpp",
5050
"/src/pyclblast/src/pyclblast.pyx"
5151
]
52-
HEADER_LINES = [131, 18, 136, 21, 27, 42, 31, 65, 37, 98, 18, 341]
52+
HEADER_LINES = [145, 18, 150, 21, 27, 42, 31, 65, 37, 98, 18, 341]
5353
FOOTER_LINES = [96, 54, 102, 207, 6, 6, 6, 9, 2, 39, 53, 37]
5454
HEADER_LINES_DOC = 0
5555
FOOTER_LINES_DOC = 232

src/clpp11.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,19 @@
4444
#include <vector> // std::vector
4545

4646
// OpenCL
47+
#ifndef CL_TARGET_OPENCL_VERSION
4748
#define CL_TARGET_OPENCL_VERSION 110
4849
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings
4950
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
5051
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // to disable deprecation warnings
52+
#elif defined(CL_TARGET_OPENCL_VERSION) && CL_TARGET_OPENCL_VERSION < 110
53+
#pragma warning "OpenCL Version must be at least 1.1 (110) to use CLBlast, redefining"
54+
#undef CL_TARGET_OPENCL_VERSION
55+
#define CL_TARGET_OPENCL_VERSION 110
56+
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings
57+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS // to disable deprecation warnings
58+
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // to disable deprecation warnings
59+
#endif
5160
#if defined(__APPLE__) || defined(__MACOSX)
5261
#include <OpenCL/opencl.h>
5362
#else

0 commit comments

Comments
 (0)