Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit b2b084c

Browse files
authored
Removing all ComputeCpp occurences (#520)
1 parent 1586b7e commit b2b084c

28 files changed

+60
-1787
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ local.properties
8484
.springBeans
8585

8686
# CMake generated files
87-
tools/computecpp_info/common_device_compiler_flags.h
8887
build/
8988

9089
# Doxygen

.scripts/build_computecpp.sh

-11
This file was deleted.

CMakeLists.txt

+2-15
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ set(PORTBLAS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src)
106106
set(PORTBLAS_SRC_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/python_generator)
107107
list(APPEND THIRD_PARTIES_INCLUDE ${CBLAS_INCLUDE})
108108

109-
if(IMGDNN_DIR)
110-
add_definitions(-DIMGDNN_LIBRARY)
111-
find_package(IMGDNN REQUIRED)
112-
list(APPEND THIRD_PARTIES_INCLUDE ${IMGDNN_INCLUDE_DIRS})
113-
endif()
114-
115109
option(BLAS_ENABLE_EXTENSIONS "Whether to enable portBLAS extensions" ON)
116110
option(BLAS_ENABLE_COMPLEX "Whether to enable complex data type for GEMM" OFF)
117111
option(BLAS_ENABLE_HALF "Whether to enable sycl::half data type for supported operators" OFF)
@@ -183,26 +177,19 @@ else()
183177
# The portblas target is just a collection of other objects so
184178
# the linked libraries are not going to be propagated to this target.
185179
# This requires manual linking against SYCL on Windows.
186-
if(is_computecpp)
187-
target_link_libraries(portblas PUBLIC ComputeCpp::ComputeCpp)
188-
elseif(is_dpcpp)
180+
if(is_dpcpp)
189181
target_link_libraries(portblas PUBLIC DPCPP::DPCPP)
190182
elseif(is_adaptivecpp)
191183
target_link_libraries(portblas PUBLIC AdaptiveCpp::acpp-rt)
192184
endif()
193185
endif()
194-
if(is_computecpp)
195-
set(sycl_impl ComputeCpp::ComputeCpp)
196-
elseif(is_dpcpp)
186+
if(is_dpcpp)
197187
set(sycl_impl DPCPP::DPCPP)
198188
add_sycl_to_target(TARGET portblas SOURCES)
199189
elseif(is_adaptivecpp)
200190
set(sycl_impl AdaptiveCpp::acpp-rt)
201191
add_sycl_to_target(TARGET portblas SOURCES)
202192
endif()
203-
if(IMGDNN_DIR)
204-
target_link_libraries(portblas PUBLIC IMGDNN::IMGDNN)
205-
endif()
206193
set_target_properties(portblas PROPERTIES
207194
INTERFACE_LINK_LIBRARIES ${sycl_impl}
208195
INTERFACE_INCLUDE_DIRECTORIES "${PORTBLAS_INCLUDE}"

README.md

+1-55
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ the project.
3535
- [Instaling portBLAS](#instaling-portBLAS)
3636
- [Doxygen](#doxygen)
3737
- [CMake options](#cmake-options)
38-
- [ComputeCpp Compilation (Deprecated)](#computecpp-deprecated)
39-
- [Compile with ComputeCpp](#compile-with-computecpp)
40-
- [POWER\_VR support](#power_vr-support-computecpp-only)
41-
- [Cross-Compile](#cross-compile-computecpp-only)
4238
- [Tests and benchmarks](#tests-and-benchmarks)
4339
- [Contributing to the project](#contributing-to-the-project)
4440
- [Guides and Other Documents](#guides-and-other-documents)
@@ -493,7 +489,7 @@ Some of the supported options are:
493489
|---|---|---|
494490
| `BLAS_ENABLE_TESTING` | `ON`/`OFF` | Set it to `OFF` to avoid building the tests (`ON` is the default value) |
495491
| `BLAS_ENABLE_BENCHMARK` | `ON`/`OFF` | Set it to `OFF` to avoid building the benchmarks (`ON` is the default value) |
496-
| `SYCL_COMPILER` | name | Used to determine which SYCL implementation to use. By default, the first implementation found is used. Supported values are: `dpcpp`, `adaptivecpp` and `computecpp`*(deprecated)*. |
492+
| `SYCL_COMPILER` | name | Used to determine which SYCL implementation to use. By default, the first implementation found is used. Supported values are: `dpcpp` and `adaptivecpp`. |
497493
| `TUNING_TARGET` | name | By default, this flag is set to `DEFAULT` to restrict any device specific compiler optimizations. Use this flag to tune the code for a target (**highly recommended** for performance). The supported targets are: `INTEL_GPU`, `NVIDIA_GPU`, `AMD_GPU` |
498494
| `CMAKE_PREFIX_PATH` | path | List of paths to check when searching for dependencies |
499495
| `CMAKE_INSTALL_PREFIX` | path | Specify the install location, used when invoking `ninja install` |
@@ -509,56 +505,6 @@ Some of the supported options are:
509505
| `BLAS_ENABLE_HALF` | `ON`/`OFF` | Determines whether to enable Half data type support *(Support is limited to some Level 1 operators and Gemm)* (`OFF` by default) |
510506
| `BLAS_INDEX_TYPES` | `int32_t;int64_t` | Determines the type(s) to use for `index_t` and `increment_t`. Default is `int` |
511507

512-
## ComputeCpp Compilation *(Deprecated)*
513-
514-
portBLAS ComputeCpp compilation is deprecated since ComputeCpp releasing has been
515-
discontinued. More information about this are found in this [announcement](https://codeplay.com/portal/news/2023/07/07/the-future-of-computecpp).
516-
517-
### Compile with ComputeCpp
518-
519-
```bash
520-
cd build
521-
cmake -GNinja ../ -DComputeCpp_DIR=/path/to/computecpp -DSYCL_COMPILER=computecpp
522-
ninja
523-
```
524-
525-
### Cross-Compile *(ComputeCpp Only)*
526-
527-
To cross-compile portBLAS first the following environment variables must be
528-
set:
529-
530-
```bash
531-
export COMPUTECPP_TOOLCHAIN_DIR="PATH TO TOOLCHAIN_DIR"
532-
export COMPUTECPP_TARGET_TRIPLE="PATH TO TARGET_TRIPLE"
533-
export COMPUTECPP_SYSROOT_DIR="$PATH TO SYSROOT_DIR"
534-
```
535-
536-
Clone the [ComputeCpp-SDK](https://github.com/codeplaysoftware/computecpp-sdk) to retrieve the toolchain file.
537-
The following CMake command can be used to cross-compile portBLAS:
538-
539-
```bash
540-
cmake -GNinja \
541-
${SOURCE_ROOT} \
542-
-DCMAKE_PREFIX_PATH="${OPENBLAS_PATH}" \
543-
-DComputeCpp_DIR="${COMPUTECPP_DEVICE_PATH}" \
544-
-DComputeCpp_HOST_DIR="${COMPUTECPP_X86_PATH}" \
545-
-DCMAKE_TOOLCHAIN_FILE="/path/to/computecpp-sdk/cmake/toolchains/gcc-generic.cmake" \
546-
-DCMAKE_BUILD_TYPE='Release' \
547-
-DCMAKE_INSTALL_PREFIX=${CROSS_COMPILED_PORTBLAS_INSTALL} \
548-
-DOpenCL_INCLUDE_DIR="${OpenCL_Headers_PATH}" \
549-
-DOpenCL_LIBRARY="${OpenCL_LIBRARY}" \
550-
-DCOMPUTECPP_BITCODE="${DEVICE_BITCODE}" \
551-
-DCMAKE_CXX_FLAGS='-O3' \
552-
-DTUNING_TARGET="${CHOSEN_TARGET}"
553-
```
554-
555-
### POWER_VR support *(ComputeCpp Only)*
556-
557-
To enable the PowerVR target tuning, pass: `-DTUNING_TARGET=POWER_VR`
558-
559-
To use the neural network library from Imagination, pass: `-DIMGDNN_DIR=path/to/library`
560-
561-
562508
## Tests and benchmarks
563509

564510
The tests and benchmarks have their own documentation:

benchmark/CMakeLists.txt

+1-28
Original file line numberDiff line numberDiff line change
@@ -100,34 +100,7 @@ add_custom_command(OUTPUT git_config.h
100100
${CMAKE_CURRENT_BINARY_DIR}
101101
)
102102

103-
# Assume ComputeCpp not available by default.
104-
set(ComputeCpp_INFO_AVAILABLE false)
105-
set(ComputeCpp_VERSION_NUMBER "N/A")
106-
set(ComputeCpp_EDITION "N/A")
107-
108-
if(is_computecpp)
109-
execute_process(COMMAND ${ComputeCpp_DEVICE_COMPILER_EXECUTABLE} "--version"
110-
OUTPUT_VARIABLE ComputeCpp_DEVICE_COMPILER_VERSION
111-
RESULT_VARIABLE ComputeCpp_DEVICE_COMPILER_EXECUTABLE_RESULT
112-
OUTPUT_STRIP_TRAILING_WHITESPACE)
113-
if(NOT ComputeCpp_DEVICE_COMPILER_EXECUTABLE_RESULT EQUAL "0")
114-
message(WARNING "Compute++ not found - Error obtaining device compiler and ComputeCpp version!")
115-
else()
116-
# Store information about ComputeCpp/compiler for benchmarking.
117-
set(ComputeCpp_INFO_AVAILABLE true)
118-
string(REGEX MATCH
119-
"(CE|PE|RC)" ComputeCpp_EDITION ${ComputeCpp_DEVICE_COMPILER_VERSION})
120-
if(${ComputeCpp_EDITION} STREQUAL "RC")
121-
set(ComputeCpp_EDITION "Internal")
122-
endif()
123-
string(REGEX MATCH "([0-9]+\.[0-9]+\.[0-9]+)"
124-
ComputeCpp_VERSION_NUMBER ${ComputeCpp_DEVICE_COMPILER_VERSION})
125-
endif()
126-
endif()
127-
128-
configure_file(computecpp_version_config.h.in computecpp_version_config.h @ONLY)
129-
130-
add_library(bench_info STATIC bench_info.cc git_config.h computecpp_version_config.h)
103+
add_library(bench_info STATIC bench_info.cc git_config.h)
131104
target_include_directories(bench_info PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
132105

133106
if(VERBOSE)

benchmark/bench_info.cc

-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@
2222
* @filename bench_info.cc
2323
*
2424
**************************************************************************/
25-
#include "computecpp_version_config.h"
2625
#include "git_config.h"

benchmark/computecpp_version_config.h.in

-34
This file was deleted.

cmake/CmakeFunctionHelper.cmake

+1-28
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ function(set_target_compile_def in_target)
9393
target_compile_definitions(${in_target} PUBLIC INTEL_GPU=1)
9494
elseif(${TUNING_TARGET} STREQUAL "AMD_GPU")
9595
target_compile_definitions(${in_target} PUBLIC AMD_GPU=1)
96-
elseif(${TUNING_TARGET} STREQUAL "POWER_VR")
97-
target_compile_definitions(${in_target} PUBLIC POWER_VR=1)
9896
elseif(${TUNING_TARGET} STREQUAL "NVIDIA_GPU")
9997
target_compile_definitions(${in_target} PUBLIC NVIDIA_GPU=1)
10098
else()
@@ -501,31 +499,6 @@ if(${TUNING_TARGET} STREQUAL "INTEL_GPU")
501499
endif()
502500
endforeach()
503501
endif() # BLAS_ENABLE_COMPLEX
504-
elseif(${TUNING_TARGET} STREQUAL "POWER_VR" AND NOT IMGDNN_DIR)
505-
set(supported_types
506-
"float"
507-
"half"
508-
)
509-
foreach(data ${supported_types})
510-
add_gemm_configuration(
511-
"${data}" 96 "true" "false" "false"
512-
16 4 6 12 8 1 1 1 1 1 1 1 1 1 float float "local" "standard" "full" 1 "strided" "false")
513-
add_gemm_configuration(
514-
"${data}" 64 "false" "false" "false"
515-
128 1 1 8 8 1 1 1 1 1 1 1 1 1 float float "local" "standard" "full" 1 "strided" "false")
516-
add_gemm_configuration(
517-
"${data}" 64 "false" "false" "false"
518-
64 4 4 8 8 1 1 1 1 1 1 1 1 1 float float "no_local" "standard" "full" 1 "strided" "false")
519-
add_gemm_configuration(
520-
"${data}" 128 "false" "false" "false"
521-
16 4 8 16 8 1 1 1 1 1 1 1 1 1 float float "local" "standard" "full" 1 "strided" "false")
522-
add_gemm_configuration(
523-
"${data}" 64 "false" "false" "false"
524-
32 4 4 8 8 1 1 1 1 1 1 1 1 1 float float "local" "standard" "full" 1 "strided" "false")
525-
add_gemm_configuration(
526-
"${data}" 64 "false" "false" "false"
527-
64 4 4 4 4 1 1 1 1 4 4 1 1 1 float float "no_local" "standard" "full" 4 "interleaved" "false")
528-
endforeach()
529502
elseif(${TUNING_TARGET} STREQUAL "AMD_GPU") # need investigation
530503
set(supported_types
531504
"float"
@@ -749,7 +722,7 @@ else() # default cpu backend
749722
endif()
750723
add_library(${func} OBJECT ${gemm_sources})
751724
set_target_compile_def(${func})
752-
# The blas library depends on FindComputeCpp
725+
753726
target_include_directories(${func} PRIVATE ${PORTBLAS_SRC} ${PORTBLAS_INCLUDE}
754727
${PORTBLAS_COMMON_INCLUDE_DIR} ${THIRD_PARTIES_INCLUDE})
755728
message(STATUS "Adding SYCL to target ${func}")

0 commit comments

Comments
 (0)