Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cderb/gtest_package' into sl/con…
Browse files Browse the repository at this point in the history
…v_igemm_dynamic_dlops_env_var_update
  • Loading branch information
CAHEK7 committed Dec 20, 2023
2 parents d104a37 + a13243f commit 1d27707
Show file tree
Hide file tree
Showing 74 changed files with 419 additions and 950 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ option(BUILD_SHARED_LIBS "Create shared libraries" ON)

if(MIOPEN_ENABLE_SQLITE)
# MIOpen now depends on SQLite as well
find_package(PkgConfig)
pkg_check_modules(SQLITE3 REQUIRED sqlite3)
find_package(SQLite3 REQUIRED)
endif()
find_package(BZip2)
find_package(nlohmann_json 3.9.1 REQUIRED)
Expand Down
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,4 @@ RUN pip3 install -r /doc-requirements.txt
# Composable Kernel requires this version cmake
RUN pip3 install --upgrade cmake==3.27.5

# Use parallel job to accelerate tensile build
# Workaround for Tensile with TargetID feature
ARG USE_TARGETID="OFF"
RUN if [ "$USE_TARGETID" = "ON" ] ; then export HIPCC_LINK_FLAGS_APPEND='-O3 -parallel-jobs=4' && export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=4' && rm -f /usr/bin/hipcc; fi

# install last released miopentensile in default (master), install latest commits when MIOTENSILE_VER="latest" (develop)
ARG MIOTENSILE_VER="default"
RUN if [ "$USE_TARGETID" = "OFF" ] ; then echo "MIOpenTensile is not installed."; elif [ "$MIOTENSILE_VER" = "latest" ] ; then cget -p $PREFIX install ROCmSoftwarePlatform/MIOpenTensile@94a9047741d16a8eccd290131b78fb1aa69cdcdf; else cget -p $PREFIX install ROCmSoftwarePlatform/MIOpenTensile@94a9047741d16a8eccd290131b78fb1aa69cdcdf; fi

RUN groupadd -f render
22 changes: 10 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ def getDockerImage(Map conf=[:])
env.DOCKER_BUILDKIT=1
def prefixpath = conf.get("prefixpath", "/opt/rocm") // one image for each prefix 1: /usr/local 2:/opt/rocm
def gpu_arch = "gfx900;gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102" // prebuilt dockers should have all the architectures enabled so one image can be used for all stages
def miotensile_version = conf.get("miotensile_version", "default") // deprecated
def target_id = conf.get("target_id", "OFF") // deprecated
def mlir_build = conf.get("mlir_build", "ON") // always ON
def dockerArgs = "--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg MIOTENSILE_VER='${miotensile_version}' --build-arg USE_TARGETID='${target_id}' --build-arg USE_MLIR='${mlir_build}' "
def dockerArgs = "--build-arg BUILDKIT_INLINE_CACHE=1 --build-arg PREFIX=${prefixpath} --build-arg GPU_ARCH='${gpu_arch}' --build-arg USE_MLIR='${mlir_build}' "
if(env.CCACHE_HOST)
{
def check_host = sh(script:"""(printf "PING\r\n";) | nc -N ${env.CCACHE_HOST} 6379 """, returnStdout: true).trim()
Expand Down Expand Up @@ -436,15 +434,15 @@ pipeline {
description: "")
booleanParam(
name: "BUILD_SMOKE_FP32",
defaultValue: env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false,
defaultValue: true, //env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false,
description: "")
booleanParam(
name: "BUILD_SMOKE_AUX1",
defaultValue: env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false,
defaultValue: true, //env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false,
description: "")
booleanParam(
name: "BUILD_SMOKE_FP16_BF16_INT8",
defaultValue: env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false,
defaultValue: true, //env.BRANCH_NAME == env.NIGHTLY_BRANCH ? true : false,
description: "")
booleanParam(
name: "BUILD_FULL_TESTS",
Expand Down Expand Up @@ -535,10 +533,10 @@ pipeline {
Smoke_targets = "check MIOpenDriver"
NOCOMGR_flags = " -DMIOPEN_USE_COMGR=Off"
}
triggers{

cron(env.BRANCH_NAME == env.NIGHTLY_BRANCH ? env.NIGHTLY_SCHEDULE : '')
}
//triggers{
//
// cron(env.BRANCH_NAME == env.NIGHTLY_BRANCH ? env.NIGHTLY_SCHEDULE : '')
//}
stages{
stage('Build Docker'){
when {
Expand Down Expand Up @@ -924,7 +922,7 @@ pipeline {
environment{
setup_flags="-DDISCRETE_GTEST=1 -DMIOPEN_TEST_DBSYNC=1"
config_targets='test_db_sync'
execute_cmd='./bin/test_db_sync'
execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync'
}
steps{
buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, config_targets: config_targets, execute_cmd: execute_cmd,
Expand All @@ -943,7 +941,7 @@ pipeline {
environment{
setup_flags="-DDISCRETE_GTEST=1 -DMIOPEN_TEST_DBSYNC=1"
config_targets='test_db_sync'
execute_cmd='./bin/test_db_sync'
execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync'
}
steps{
buildHipClangJobAndReboot(lfs_pull: true, setup_flags: setup_flags, config_targets: config_targets, execute_cmd: execute_cmd,
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
* HIP -
* HIP and HCC libraries and header files.
* OpenCL - OpenCL libraries and header files.
* [MIOpenGEMM](https://github.com/ROCmSoftwarePlatform/MIOpenGEMM) - enable various functionalities including transposed and dilated convolutions.
* This is optional on the HIP backend, and required on the OpenCL backend.
* Users can enable this library using the cmake configuration flag `-DMIOPEN_USE_MIOPENGEMM=On`, which is enabled by default when OpenCL backend is chosen.
* [ROCm cmake](https://github.com/RadeonOpenCompute/rocm-cmake) - provide cmake modules for common build tasks needed for the ROCM software stack.
* [Half](http://half.sourceforge.net/) - IEEE 754-based half-precision floating point library
* [Boost](http://www.boost.org/)
* MIOpen uses `boost-system` and `boost-filesystem` packages to enable persistent [kernel cache](https://rocm.docs.amd.com/projects/MIOpen/en/latest/cache.html)
* Version 1.79 is recommended, older version may need patches to work on newer systems, e.g. boost1{69,70,72} w/glibc-2.34
* [SQLite3](https://sqlite.org/index.html) - reading and writing performance database
* lbzip2 - multi-threaded compress or decompress utility
* [MIOpenTENSILE](https://github.com/ROCmSoftwarePlatform/MIOpenTensile) - users can enable this library using the cmake configuration flag`-DMIOPEN_USE_MIOPENTENSILE=On`. (deprecated after ROCm 5.1.1)
* [rocBLAS](https://github.com/ROCm/rocBLAS) - AMD library for Basic Linear Algebra Subprograms (BLAS) on the ROCm platform.
* Minimum version branch for pre-ROCm 3.5 [master-rocm-2.10](https://github.com/ROCm/rocBLAS/tree/master-rocm-2.10)
* Minimum version branch for post-ROCm 3.5 [master-rocm-3.5](https://github.com/ROCm/rocBLAS/releases/tag/rocm-3.5.0)
Expand Down Expand Up @@ -106,8 +102,6 @@ This prefix can used to specify the dependency path during the configuration pha

* MIOpen's HIP backend uses [rocBLAS](https://github.com/ROCm/rocBLAS) by default. Users can install rocBLAS minimum release by using `apt-get install rocblas`. To disable using rocBLAS set the configuration flag `-DMIOPEN_USE_ROCBLAS=Off`. rocBLAS is *not* available for the OpenCL backend.

* MIOpen's OpenCL backend uses [MIOpenGEMM](https://github.com/ROCmSoftwarePlatform/MIOpenGEMM) by default. Users can install MIOpenGEMM minimum release by using `apt-get install miopengemm`.

## Building MIOpen from source

### Configuring with cmake
Expand Down
91 changes: 0 additions & 91 deletions cmake/Findzstd.cmake

This file was deleted.

3 changes: 1 addition & 2 deletions docs/DebugAndLogging.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ The `ROCBLAS_LAYER` environmental variable can be set to output GEMM information
* `ROCBLAS_LAYER=2` - is set to 2, then there is bench logging
* `ROCBLAS_LAYER=3` - is set to 3, then there is both trace and bench logging
Additionally, using environment variable "MIOPEN_GEMM_ENFORCE_BACKEND", can override the default behavior. The default behavior which is to use
both MIOpenGEMM and rocBlas depending on the input configuration:
Additionally, the environment variable "MIOPEN_GEMM_ENFORCE_BACKEND" can be set to override default GEMM backend (Default GEMM backend is rocBLAS):
* `MIOPEN_GEMM_ENFORCE_BACKEND=1`, use rocBLAS if enabled
* `MIOPEN_GEMM_ENFORCE_BACKEND=2`, reserved
Expand Down
5 changes: 0 additions & 5 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
* HIP -
* HIP and HCC libraries and header files.
* OpenCL - OpenCL libraries and header files.
* [MIOpenGEMM](https://github.com/ROCmSoftwarePlatform/MIOpenGEMM) - enable various functionalities including transposed and dilated convolutions.
* This is optional on the HIP backend, and required on the OpenCL backend.
* Users can enable this library using the cmake configuration flag `-DMIOPEN_USE_MIOPENGEMM=On`, which is enabled by default when OpenCL backend is chosen.
* [ROCm cmake](https://github.com/RadeonOpenCompute/rocm-cmake) - provide cmake modules for common build tasks needed for the ROCM software stack.
* [Half](http://half.sourceforge.net/) - IEEE 754-based half-precision floating point library
* [Boost](http://www.boost.org/)
Expand Down Expand Up @@ -72,5 +69,3 @@ cmake -P install_deps.cmake --minimum --prefix /root/MIOpen/install_dir
This prefix can used to specify the dependency path during the configuration phase using the `CMAKE_PREFIX_PATH`.

* MIOpen's HIP backend uses [rocBLAS](https://github.com/ROCm/rocBLAS) by default. Users can install rocBLAS minimum release by using `apt-get install rocblas`. To disable using rocBLAS set the configuration flag `-DMIOPEN_USE_ROCBLAS=Off`. rocBLAS is *not* available for the OpenCL backend.

* MIOpen's OpenCL backend uses [MIOpenGEMM](https://github.com/ROCm/MIOpenGEMM) by default. Users can install MIOpenGEMM minimum release by using `apt-get install miopengemm`.
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rocm-docs-core==0.30.1
rocm-docs-core==0.30.2
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ requests==2.31.0
# via
# pygithub
# sphinx
rocm-docs-core==0.30.1
rocm-docs-core==0.30.2
# via -r requirements.in
smmap==5.0.0
# via gitdb
Expand Down
2 changes: 1 addition & 1 deletion fin
Submodule fin updated from ae2ff1 to 044f5e
4 changes: 1 addition & 3 deletions include/miopen/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#cmakedefine01 MIOPEN_BACKEND_OPENCL
#cmakedefine01 MIOPEN_BACKEND_HIP
#cmakedefine01 MIOPEN_MODE_NOGPU
#cmakedefine01 MIOPEN_USE_MIOPENTENSILE
#cmakedefine01 MIOPEN_USE_MIOPENGEMM
#cmakedefine01 MIOPEN_USE_ROCBLAS
#cmakedefine01 MIOPEN_BUILD_DEV
#cmakedefine01 MIOPEN_GPU_SYNC
Expand Down Expand Up @@ -86,7 +84,7 @@
#cmakedefine MIOPEN_OFFLOADBUNDLER_BIN "@MIOPEN_OFFLOADBUNDLER_BIN@"
#cmakedefine MIOPEN_CACHE_DIR "@MIOPEN_CACHE_DIR@"

#define MIOPEN_USE_GEMM (MIOPEN_USE_MIOPENTENSILE || MIOPEN_USE_MIOPENGEMM || MIOPEN_USE_ROCBLAS)
#define MIOPEN_USE_GEMM (MIOPEN_USE_ROCBLAS)

// Usage of "defined" operator within macro expansion is undefined behavior,
// so "defined(NDEBUG)" cannot be used there... unlike the following macro:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sqlite3@3.43.2 -DCMAKE_POSITION_INDEPENDENT_CODE=On
boost@1.83 -DCMAKE_POSITION_INDEPENDENT_CODE=On --build -DCMAKE_CXX_FLAGS=" -std=c++14 -Wno-enum-constexpr-conversion -Wno-deprecated-builtins -Wno-deprecated-declarations "
facebook/[email protected] -X subdir -DCMAKE_DIR=build/cmake
ROCmSoftwarePlatform/half@10abd99e7815f0ca5d892f58dd7d15a23b7cf92c --build
ROCmSoftwarePlatform/[email protected] -H sha256:a5f62769d28a73e60bc8d61022820f050e97c977c8f6f6275488db31512e1f42 -DBUILD_FAT_LIBROCKCOMPILER=1 -DCMAKE_IGNORE_PATH=/opt/conda/envs/py_3.9 -DCMAKE_IGNORE_PREFIX_PATH=/opt/conda
nlohmann/[email protected] -DJSON_MultipleHeaders=ON -DJSON_BuildTests=Off
Expand Down
8 changes: 1 addition & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ set( MIOpen_Source
solver/fft.cpp
solver/gemm.cpp
solver/gemm_bwd.cpp
solver/gemm_common.cpp
solver/gemm_wrw.cpp
solver/norm/forward_layernorm.cpp
solver/norm/forward_layernorm2d_ck.cpp
Expand Down Expand Up @@ -829,12 +828,7 @@ endif()
#######################################
if(MIOPEN_ENABLE_SQLITE)
# MIOpen depends on SQLite
target_include_directories(MIOpen SYSTEM PRIVATE ${SQLITE3_STATIC_INCLUDE_DIRS})
target_include_directories(MIOpen SYSTEM INTERFACE $<BUILD_INTERFACE:${SQLITE3_STATIC_INCLUDE_DIRS}>)
target_compile_options(MIOpen PRIVATE ${SQLITE3_STATIC_CFLAGS})
target_compile_options(MIOpen INTERFACE $<BUILD_INTERFACE:${SQLITE3_STATIC_CFLAGS}>)
target_link_libraries(MIOpen PRIVATE ${SQLITE3_STATIC_LDFLAGS})
target_link_libraries(MIOpen INTERFACE $<BUILD_INTERFACE:${SQLITE3_STATIC_LDFLAGS}>)
target_link_libraries(MIOpen PRIVATE SQLite::SQLite3)
endif()
############################################################
# MIOpen depends on librt for Boost.Interprocess
Expand Down
1 change: 0 additions & 1 deletion src/anyramdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <miopen/errors.hpp>
#include <miopen/logger.hpp>
#include <miopen/md5.hpp>

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem.hpp>
Expand Down
Loading

0 comments on commit 1d27707

Please sign in to comment.