You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#enable or disable offline compilation for different devices. Currently only Hawaii, Bonaire, Tahiti have the option.
29
-
option( OCL_OFFLINE_BUILD_HAWAII_KERNEL"Offline compile the OpenCL kernels for Hawaii device"OFF)
30
-
option( OCL_OFFLINE_BUILD_BONAIRE_KERNEL"Offline compile the OpenCL kernels for Bonaire device"OFF)
31
-
option( OCL_OFFLINE_BUILD_TAHITI_KERNEL"Offline compile the OpenCL kernels for Tathit device"OFF)
32
-
33
-
if( (OCL_OFFLINE_BUILD_HAWAII_KERNELANDOCL_OFFLINE_BUILD_BONAIRE_KERNEL) OR (OCL_OFFLINE_BUILD_HAWAII_KERNELANDOCL_OFFLINE_BUILD_TAHITI_KERNEL) OR (OCL_OFFLINE_BUILD_BONAIRE_KERNELANDOCL_OFFLINE_BUILD_TAHITI_KERNEL))
34
-
MESSAGE( WARNING"More than one device is chosen for offline compilation of static kernels. This might result in running out of heap memory with certain driver. Please consider offline compliation for ONE device only." )
35
-
endif( )
36
-
37
-
if( NOTOCL_OFFLINE_BUILD_HAWAII_KERNEL )
29
+
#option( OPENCL_OFFLINE_BUILD_HAWAII_KERNEL "Offline compile the OpenCL kernels for Hawaii device" OFF)
30
+
#option( OPENCL_OFFLINE_BUILD_BONAIRE_KERNEL "Offline compile the OpenCL kernels for Bonaire device" OFF)
31
+
#option( OPENCL_OFFLINE_BUILD_TAHITI_KERNEL "Offline compile the OpenCL kernels for Tathit device" OFF)
32
+
set( OPENCL_OFFLINE_BUILD_HAWAII_KERNELOFF)
33
+
set( OPENCL_OFFLINE_BUILD_BONAIRE_KERNELOFF)
34
+
set( OPENCL_OFFLINE_BUILD_TAHITI_KERNELOFF)
35
+
36
+
#if( (OPENCL_OFFLINE_BUILD_HAWAII_KERNEL AND OPENCL_OFFLINE_BUILD_BONAIRE_KERNEL) OR (OPENCL_OFFLINE_BUILD_HAWAII_KERNEL AND OPENCL_OFFLINE_BUILD_TAHITI_KERNEL) OR (OPENCL_OFFLINE_BUILD_BONAIRE_KERNEL AND OPENCL_OFFLINE_BUILD_TAHITI_KERNEL))
37
+
# MESSAGE( WARNING "More than one device is chosen for offline compilation of static kernels. This might result in running out of heap memory with certain driver. Please consider offline compliation for ONE device only." )
38
+
#endif( )
39
+
40
+
#if( NOT OPENCL_OFFLINE_BUILD_HAWAII_KERNEL )
38
41
#use dynamic generated kernels
39
-
MESSAGE(STATUS"Build dynamic Hawaii kernels.")
40
-
MESSAGE(STATUS"Check OCL_OFFLINE_BUILD_HAWAII_KERNEL to build kernls at compile-time. This will eliminates clBuildProgram() overhead and better kernel performance with certain driver.")
42
+
# MESSAGE(STATUS "Build dynamic Hawaii kernels.")
43
+
# MESSAGE(STATUS "Check OPENCL_OFFLINE_BUILD_HAWAII_KERNEL to build kernls at compile-time. This will eliminates clBuildProgram() overhead and better kernel performance with certain driver.")
41
44
add_definitions(-DCLBLAS_HAWAII_DYNAMIC_KERNEL)
42
-
else()
43
-
MESSAGE(STATUS"Build static Hawaii kernels.")
44
-
MESSAGE(STATUS"Uncheck OCL_OFFLINE_BUILD_HAWAII_KERNEL to build kernls at run-time")
45
-
MESSAGE(STATUS"Please ensure the presence of Hawaii device in the system. With certain driver/compiler flags, this might result in compile-time error.")
46
-
endif( )
45
+
#else()
46
+
# MESSAGE(STATUS "Build static Hawaii kernels.")
47
+
# MESSAGE(STATUS "Uncheck OPENCL_OFFLINE_BUILD_HAWAII_KERNEL to build kernls at run-time")
48
+
# MESSAGE(STATUS "Please ensure the presence of Hawaii device in the system. With certain driver/compiler flags, this might result in compile-time error.")
49
+
#endif( )
47
50
48
-
if( NOTOCL_OFFLINE_BUILD_BONAIRE_KERNEL )
51
+
#if( NOT OPENCL_OFFLINE_BUILD_BONAIRE_KERNEL )
49
52
#use dynamic generated kernels
50
-
MESSAGE(STATUS"Build dynamic Bonaire kernels.")
51
-
MESSAGE(STATUS"Check OCL_OFFLINE_BUILD_BONAIRE_KERNEL to build kernls at compile-time. This will eliminates clBuildProgram() overhead and better kernel performance with certain driver.")
# MESSAGE(STATUS "Check OPENCL_OFFLINE_BUILD_BONAIRE_KERNEL to build kernls at compile-time. This will eliminates clBuildProgram() overhead and better kernel performance with certain driver.")
52
55
add_definitions(-DCLBLAS_BONAIRE_DYNAMIC_KERNEL)
53
-
else()
54
-
MESSAGE(STATUS"Build static Bonaire kernels.")
55
-
MESSAGE(STATUS"Uncheck OCL_OFFLINE_BUILD_BONAIRE_KERNEL to build kernls at run-time")
56
-
MESSAGE(STATUS"Please ensure the presence of Bonaire device in the system. With certain driver/compiler flags, this might result in compile-time error.")
57
-
endif( )
56
+
#else()
57
+
# MESSAGE(STATUS "Build static Bonaire kernels.")
58
+
# MESSAGE(STATUS "Uncheck OPENCL_OFFLINE_BUILD_BONAIRE_KERNEL to build kernls at run-time")
59
+
# MESSAGE(STATUS "Please ensure the presence of Bonaire device in the system. With certain driver/compiler flags, this might result in compile-time error.")
60
+
#endif( )
58
61
59
-
if( NOTOCL_OFFLINE_BUILD_TAHITI_KERNEL )
62
+
#if( NOT OPENCL_OFFLINE_BUILD_TAHITI_KERNEL )
60
63
#use dynamic generated kernels
61
-
MESSAGE(STATUS"Build dynamic Tahiti kernels.")
62
-
MESSAGE(STATUS"Check OCL_OFFLINE_BUILD_TAHITI_KERNEL to build kernls at compile-time. This will eliminates clBuildProgram() overhead and better kernel performance with certain driver.")
64
+
# MESSAGE(STATUS "Build dynamic Tahiti kernels.")
65
+
# MESSAGE(STATUS "Check OPENCL_OFFLINE_BUILD_TAHITI_KERNEL to build kernls at compile-time. This will eliminates clBuildProgram() overhead and better kernel performance with certain driver.")
63
66
add_definitions(-DCLBLAS_TAHITI_DYNAMIC_KERNEL)
64
-
else( )
65
-
MESSAGE(STATUS"Build static Tahiti kernels.")
66
-
MESSAGE(STATUS"Uncheck OCL_OFFLINE_BUILD_TAHITI_KERNEL to build kernls at run-time")
67
-
MESSAGE(STATUS"Please ensure the presence of Tahiti device in the system. With certain driver/compiler flags, this might result in compile-time error.")
68
-
endif( )
67
+
#else( )
68
+
# MESSAGE(STATUS "Build static Tahiti kernels.")
69
+
# MESSAGE(STATUS "Uncheck OPENCL_OFFLINE_BUILD_TAHITI_KERNEL to build kernls at run-time")
70
+
# MESSAGE(STATUS "Please ensure the presence of Tahiti device in the system. With certain driver/compiler flags, this might result in compile-time error.")
71
+
#endif( )
69
72
70
73
71
74
# Ask the user to verify compiler version. If OpenCL 2.0 is supported. Certain public flags can be user
72
-
set( OCL_VERSION"1.2"CACHESTRING"The version of OpenCL supported by your driver/device" )
0 commit comments