Commit Graph

1141 Commits

Author SHA1 Message Date
dependabot[bot]
0ce417269d Bump sphinxcontrib-bibtex from 2.6.1 to 2.6.2 in /docs/sphinx (#1129)
Bumps [sphinxcontrib-bibtex](https://github.com/mcmtroffaes/sphinxcontrib-bibtex) from 2.6.1 to 2.6.2.
- [Changelog](https://github.com/mcmtroffaes/sphinxcontrib-bibtex/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/mcmtroffaes/sphinxcontrib-bibtex/compare/2.6.1...2.6.2)

---
updated-dependencies:
- dependency-name: sphinxcontrib-bibtex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 11:27:03 -07:00
Illia Silin
886d9eeb99 Add an option to change the number of warm-up cycles and iterations. (#1124)
* allow setting the number of warmup cycles and iterations for profiler

* fix the gemm_splitk and grouped_gemm examples
2024-01-09 09:43:08 -08:00
raramakr
e699dbd8a3 SWDEV-439954 - Use hard coded filename rather than using the macro __FILE__ for debug prints. (#1123)
* SWDEV-439954 - Use hard coded filename rather than using the macro __FILE__ for debug prints.

Hiptensor library is using the header files from CK. Hard coded ROCm path was getting embedded into the hiptensor library, since the header file was having the macro __FILE__. Replace the macro with filename.

* fix syntax

---------

Co-authored-by: illsilin <Illia.Silin@amd.com>
2024-01-09 08:21:47 -08:00
Illia Silin
22db1e0865 fix dockerfile syntax for test compilers (#1120) 2024-01-05 13:54:40 -08:00
randyh62
a39163814e doc reorg and edits (#1112)
* doc reorg and edits

* Update wrapper.rst with changes from PR #1098

* Update docs/dockerhub.rst

Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>

* Update docs/index.rst

Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>

* Update docs/what-is-ck.rst

Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>

* Update docs/what-is-ck.rst

Restored to 4 bullets, with additional text for wrapper.

Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>

* Update docs/Contributors_Guide.rst

Co-authored-by: Lisa <lisajdelaney@gmail.com>

* Update API_Reference_Guide.rst

using sentence case for title

* updated index structure per Lisa

* separate docker hub and tutorial

---------

Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>
Co-authored-by: Lisa <lisajdelaney@gmail.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
2024-01-05 11:04:01 -08:00
Bartlomiej Wroblewski
61545bda35 Update the recommended version of ROCm in docs (#1110) 2024-01-05 09:36:02 -08:00
Illia Silin
d89700201b Add a docker for testing CK with rocm6.0.1 RC1. (#1119)
* add docker for rocm6.0.1 rc1

* modify the path to clang for test compilers in CI

* fix the hipcc/clang path for test compilers in CI

* fix the dockerfile for older rocm versions
2024-01-05 08:01:33 -08:00
Bartłomiej Kocot
11e2752261 Add missing copyrights in elementwise_permute examples (#1118) 2024-01-04 17:38:24 +01:00
arai713
aa3e2d7967 Transpose profiler fix (#1114)
* added working example for 5D input using 1D kernel

* example with 5D input tensor and 2d kernel - not working: issues with arguments

* added updated version of 3d device op - changed descriptors/dims

* added example file to check kernel

* fixed descriptor and isSupportedArgument stride problem

* added and modified kernel for 3d - updated tids/loop

* adding some more 5d example files

* fixed some issues

* changes made for testing

* working version: fixed error in stride for A, still a bit inefficient

* cleaned up formatting/comments

* updating formatting

* more formatting fixes

* fixing cmake, adding back gpu targets in cmake script

* adding client example

* added instances for client example

* fixed errors in client example

* implemented client ex with device_elementwise.hpp and device_elementwise_3d_impl.hpp

* removed extra files

* minor formatting and naming fixes

* adding test files and profiler

* fixing minor error

* minor fix

* removed unneccesary comments, renamed files

* updated instance list for client example, added different layout example

* removing instances

* fixed error in instance generation

* remove comments

* update profiler and client example tensor layouts

* fixed errors in test/profiler

* updated vector dim access to enable vector load

* updated test/profiler files

* updated example with 1d kernel

* updating profiler

* renamed files

* disabled device op for MI300

* skip  elementwise_permute_2d on gfx94x

* Update CMakeLists.txt

* fixing CMake - disabling some GPU targets

* added transpose profiler to CMake

* fixed transpose profiler errors

* fixed instances for tests/profiler

* cleaned up code in transpose profiler source code

* added some comments, updated copyright

* made function arguments const where possible

---------

Co-authored-by: Jing Zhang <jizha@amd.com>
Co-authored-by: Jing Zhang <jizhan@amd.com>
Co-authored-by: zjing14 <zhangjing14@gmail.com>
2024-01-04 10:33:19 -06:00
Illia Silin
fbf31a2ea3 fix the cmake option syntax (#1117) 2024-01-03 07:56:44 -08:00
Bartłomiej Kocot
4234b3a691 Add tensor partition and generic copy for ck wrapper (#1108)
* Add tensor partition and generic copy for ck wrapper

* Update changelog

* Stylistic fixes

* Change shape/strides logic to descriptor transforms

* Fixes

* Fix client example

* Fix comments
2024-01-03 01:10:57 +01:00
Illia Silin
b268f273de adding -Wno-switch-default compiler flag (#1115) 2024-01-02 14:01:12 -08:00
Illia Silin
0e07dfdeab change the googletest cmake syntax for older cmake versions (#1116) 2024-01-02 14:00:53 -08:00
Bartłomiej Kocot
a35e466c86 Revert "[SWDEV-435347] disable instances failed with mainlien compiler (#1077)" (#1101)
This reverts commit ff24b537cb.
2024-01-02 11:36:45 +01:00
Bartłomiej Kocot
20b1ae7ced Fix results verify in test_tensor (#1109) 2023-12-23 22:12:49 +01:00
dependabot[bot]
78eb3f0b46 Bump rocm-docs-core from 0.30.2 to 0.30.3 in /docs/sphinx (#1107)
Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.30.2 to 0.30.3.
- [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases)
- [Changelog](https://github.com/RadeonOpenCompute/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/RadeonOpenCompute/rocm-docs-core/compare/v0.30.2...v0.30.3)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 14:35:25 -08:00
Artur Wojcik
fb5bd51b42 enable compilation of INSTANCES_ONLY for Windows (#1082)
* enable compilation of INSTANCES_ONLY for Windows

* suppress ROCMChecks warnings on GoogleTests

* suppress -Wfloat-equal warning on GoogleTests

---------

Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
2023-12-20 14:34:53 -08:00
rocking
b305a29e4b Remove index tensor in avgpool (#1093)
* Remove index tensor

* fix syntax

---------

Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
Co-authored-by: illsilin <Illia.Silin@amd.com>
2023-12-19 07:45:38 -08:00
dependabot[bot]
a167e3c744 Bump rocm-docs-core from 0.30.1 to 0.30.2 in /docs/sphinx (#1104)
Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.30.1 to 0.30.2.
- [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases)
- [Changelog](https://github.com/RadeonOpenCompute/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/RadeonOpenCompute/rocm-docs-core/compare/v0.30.1...v0.30.2)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 07:17:27 -08:00
Jun Liu
3ab1838fb0 ROCm 6.0 replaces all __HIP_PLATFORM_HCC__ with __HIP_PLATFORM_AMD__ (#1106)
* ROCm 6.0 replaces all __HIP_PLATFORM_HCC__ with __HIP_PLATFORM_AMD__

* make it backward compatible

* Update .clang-tidy

* Update ClangTidy.cmake
2023-12-19 07:16:49 -08:00
Illia Silin
3726a1730e add -Wno-pass-failed compiler flag (#1105) 2023-12-19 07:15:24 -08:00
arai713
12a8883c48 Hip tensor permute unit test (#1068)
* adding files for F32 example

* adding functioning implementation with scalar multiplication and unary operator support

* added fp 16 type check in unary square

* updating scalar multiplication as an operator

* functioning version with scalar operator

* changing strides for col major

* updated column major implementation

* working column major implementation

* cleaned up comments, rearranged/renamed files

* small edits to 3d transpose profiler

* adding test/profiler/instance files for hipTensor permute unit test

* added more test instances

* cleaned up errors, randomized input tensor, added more instances

* turned off time printouts

* removed conflicting transpose profiler

* rearranged some files
2023-12-18 21:35:00 -06:00
rocking
a69aa2a11a layernorm and groupnorm backward data (#1083)
* rename folder

* Add type string

* Remove typo

* Add deviceOp to backward x

* Add comment to describe the behavior of backward normalization

* Add kernel function, prepare to implement

* implement generic kernel

* Check vector size

* Add sweep once pipeline for small reduce size

* Fix bug of KRaw_ error

* Fix bug of dx stride

* sanity check for mean and rstd

* backward x for groupnorm

* Add bwd x instance

* add layernorm 2d bwd gamma beta instances

* Change save mean var type from f32 to f16 in f16 mode

* Change the example to f16

* Add groupnorm bwd gamma beta instance

* Add groupnorm bwd x instance

* Fix naming

* Add layernorm bwd x ckprofiler

* Add groupnorm bwd x profiler

* clang format

* Rename bwd x to bwd data

* Fix bug of verification in profiler

* Add test of layernorm and groupnorm bwd data

* Add missing cmake

* Add layernorm2d bwd data

* rename fwd example

* Add groupnorm client example

* Fix typo. replace Invarient with Invariant

* Add checking before running the best instance
2023-12-19 04:23:11 +08:00
Bartlomiej Wroblewski
ad0a8e4cd2 Optimize fp16 direct load GEMM instances (#1086)
This PR optimizes fp16 instances of direct load GEMM kernel introduced in #999 and #1052.

Measured the performance of new instances on CDNA2 GPU and compared it against the performance of the best non-direct-load GEMM instances. Used 76 different GEMM problems.
On average, this change improves the performance of the tested problems by 47%. For cases known as latency-bound, the speedup is around 126%.
2023-12-18 11:09:10 +01:00
Illia Silin
dcedf3632f Upgrade the default compiler to ROCm6.0 release. (#1103)
* upgrade to rocm6.0 compiler

* move rocm6.0 from private to public repo

* switch to testing hipTensor mainline in CI
2023-12-16 09:17:40 -08:00
abhimeda
3246d1f693 Adding Issue Template (#1094)
* Add files via upload

* fixed extra space typo

* add mi300 GPU architectures and rocm versions 5.6.1 and 6.0.0

---------

Co-authored-by: illsilin <Illia.Silin@amd.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
2023-12-15 09:41:35 -08:00
Bartłomiej Kocot
07092d68f0 Add tensor structure to wrapper (#1098)
* Add tensor structure to wrapper

* update changelog

* Fix names

* Comment fixes
2023-12-15 12:45:08 +01:00
trixirt
efaf31061a cmake: Add CK_PARALLEL_LINK_JOBS and CK_PARALLEL_COMPILE_JOBS options (#1063)
Copied from the llvm-project LLVM_PARALLEL_*_JOBS

Concurrent linking can break the build as well as having too many
compile jobs for the avaiable memory.  These options allow the user
to fine tune the build to fit within their machines memory
constraints.

An example use on linux is
COMPILE_JOBS=`cat /proc/cpuinfo | grep -m 1 'cpu cores' | awk '{ print $4 }'`
if [ ${COMPILE_JOBS}x = x ]; then
  COMPILE_JOBS=1
fi
BUILD_MEM=4
MEM_KB=0
MEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'`
MEM_MB=`eval "expr ${MEM_KB} / 1024"`
MEM_GB=`eval "expr ${MEM_MB} / 1024"`
COMPILE_JOBS_MEM=`eval "expr 1 + ${MEM_GB} / ${BUILD_MEM}"`
if [ "$COMPILE_JOBS_MEM" -lt "$COMPILE_JOBS" ]; then
  COMPILE_JOBS=$COMPILE_JOBS_MEM
fi
LINK_MEM=32
LINK_JOBS=`eval "expr 1 + ${MEM_GB} / ${LINK_MEM}"`

cmake -G Ninja -DCK_PARALLEL_LINK_JOBS=$LINK_JOBS
               -DCK_PARALLEL_COMPILE_JOBS=$COMPILE_JOBS

Signed-off-by: Tom Rix <trix@redhat.com>
2023-12-14 17:26:41 -08:00
Lisa
281f836903 fix typo (#1067)
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
2023-12-14 14:21:18 -08:00
Jun Liu
3a3b98ef79 [Doc][Werror] Fix security alerts and sync with MIOpen (#1085)
* fix Werror unused-parameter

* sync doc requirements

* fix blank space format

* fix dependency issue
2023-12-13 12:50:15 -08:00
Rostyslav Geyyer
6891e4d109 Fix the bugs (#1099) 2023-12-13 12:27:31 -08:00
Illia Silin
c004e0d990 disabling some fp8 gemm instances to reduce build time (#1084)
* disabling some fp8 gemm instances to reduce build time

* disable fp8 gemm instances to reduce build time

* remove the unused variable

* build fp8 gemm default and padded instances separately

* fix include pathsc
2023-12-11 17:49:27 -08:00
Bartlomiej Wroblewski
89ee47460b Fix IsSupported check in the contraction op (#1066)
Current implementation of IsSupported method in contraction ops does not cover a lot of possible cases in which ScalarPerVector cannot really be used to read A, B or D, or write E.

This PR extends both the regular and multiABD contraction ops with improved checks and also adds new instances with smaller values of ScalarPerVector to support instances that are not supported by other instances.
2023-12-11 17:12:32 +01:00
Illia Silin
f199035b74 fix clang format (#1095) 2023-12-08 14:32:37 -08:00
Nicolas Macchioni
b4dcd5803f Add F8 dtype definition in f16_f8_f16 gemm instances (#1092) 2023-12-08 13:30:01 -06:00
Bartłomiej Kocot
f836984891 Support broadcast for bias in grouped conv fwd (#1081)
* Support broadcast for bias in grouped conv fwd

* Fix comment

* Comment fixes

* Remove GK layout
2023-12-08 11:07:42 +01:00
Illia Silin
d939411dae Switch from ROCmSoftwarePlatform to ROCm org (#1091)
* switch from ROCmSoftwarePlatform to ROCm org

* replace ROCmSoftwarePlatform with ROCm in few more places
2023-12-07 15:59:34 -08:00
zjing14
33600202c6 remove imcomplete transpose profiler (#1088)
Co-authored-by: Jing Zhang <jizha@amd.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
2023-12-07 13:39:40 -06:00
dependabot[bot]
957281ce45 Bump rocm-docs-core from 0.29.0 to 0.30.1 in /docs/sphinx (#1090)
Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.29.0 to 0.30.1.
- [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases)
- [Changelog](https://github.com/RadeonOpenCompute/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/RadeonOpenCompute/rocm-docs-core/compare/v0.29.0...v0.30.1)

---
updated-dependencies:
- dependency-name: rocm-docs-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 10:32:04 -07:00
Illia Silin
6896c3b0ae Fix the CI builds using clang++ directly. (#1087)
* turn on -O3 compiler flag explicitly

* change cmake syntax for CI

* modify cmake line breaks in jenkinsfile
2023-12-06 12:48:10 -08:00
Bartłomiej Kocot
836b7e557d Introduce wrapper library (#1071)
* Introduce wrapper library

* Update cmake files

* Revert "Update cmake files"

This reverts commit c27f88b565.

* Fix comments
2023-12-06 11:58:59 +01:00
Sam Wu
f60cd9d7a6 Standardize documentation for ReadtheDocs (#1057)
Relates to https://github.com/RadeonOpenCompute/rocm-docs-core/issues/330
2023-12-05 11:05:55 -07:00
Jun Liu
ff24b537cb [SWDEV-435347] disable instances failed with mainlien compiler (#1077) 2023-12-04 23:45:16 -08:00
Illia Silin
afe4622014 Add daily run with mainline compiler. (#1075)
* add daily build with mainline compiler

* fix the compiler paths for ci

* remove the -flto flag

* build with clang by default
2023-12-04 19:04:52 -08:00
Bartlomiej Wroblewski
bc4bf9bd03 Add support for double buffering in direct load GEMM kernel (#1052)
This PR introduces support for double buffering in LDS into GEMM kernels that use direct load instructions.

Direct loads now use inline asm instead of intrinsics. Usage of intrinsics results in compiler adding additional waitcnt instructions what breaks possible load/compute overlap in case of double buffering.

Usage of inline asm results in the need to use sched_barrier in order to make sure that compiler cannot incorrectly reschedule instructions since it does not know the data dependencies between global->LDS and LDS->registers.
2023-12-03 23:08:47 +01:00
Jun Liu
c7d5c7727b [CI] Update Jenkinsfile (#1073) 2023-11-30 15:24:59 -08:00
zjing14
49df1dc595 Fixed GroupedGemmFixedNK with hipGraph (#1065)
* fixed examples; add async_mem_set

* add stream to all deviceOp using SetWorkspace

---------

Co-authored-by: Jing Zhang <jizha@amd.com>
2023-11-30 15:09:27 -06:00
Bartłomiej Kocot
8ff845f2c4 Introduce wrapper for layout (#1054)
* Introduce wrapper for layout

* Extend functionality

* Fix for getLength

* Comment fixes

* Add comments and remove not needed getters
2023-11-30 12:11:43 +01:00
arai713
a2969aa8b6 Disable transpose device op for MI300 (#1050)
* added working example for 5D input using 1D kernel

* example with 5D input tensor and 2d kernel - not working: issues with arguments

* added updated version of 3d device op - changed descriptors/dims

* added example file to check kernel

* fixed descriptor and isSupportedArgument stride problem

* added and modified kernel for 3d - updated tids/loop

* adding some more 5d example files

* fixed some issues

* changes made for testing

* working version: fixed error in stride for A, still a bit inefficient

* cleaned up formatting/comments

* updating formatting

* more formatting fixes

* fixing cmake, adding back gpu targets in cmake script

* adding client example

* added instances for client example

* fixed errors in client example

* implemented client ex with device_elementwise.hpp and device_elementwise_3d_impl.hpp

* removed extra files

* minor formatting and naming fixes

* adding test files and profiler

* fixing minor error

* minor fix

* removed unneccesary comments, renamed files

* updated instance list for client example, added different layout example

* removing instances

* fixed error in instance generation

* remove comments

* update profiler and client example tensor layouts

* fixed errors in test/profiler

* updated vector dim access to enable vector load

* updated test/profiler files

* updated example with 1d kernel

* updating profiler

* renamed files

* disabled device op for MI300

* skip  elementwise_permute_2d on gfx94x

* Update CMakeLists.txt

* fixing CMake - disabling some GPU targets

---------

Co-authored-by: Jing Zhang <jizha@amd.com>
Co-authored-by: Jing Zhang <jizhan@amd.com>
Co-authored-by: zjing14 <zhangjing14@gmail.com>
2023-11-29 11:36:40 -06:00
zjing14
ae5e5181aa recover default niter (#1064) 2023-11-28 12:18:42 -08:00