Commit Graph

972 Commits

Author SHA1 Message Date
zjing14
17d03c86d2 Fp16/fp8 mixed-precision Gemm with multiply+add fusion (#865)
* add compute_type

* add multiply_add ckProfiler

* add f8_fp16 support

* clean

* clean

* fixed lds size calc

* format

---------

Co-authored-by: Jing Zhang <jizha@amd.com>

[ROCm/composable_kernel commit: 31ea132aa2]
2023-08-28 16:27:32 -05:00
Jun Liu
a2392f1887 [HotFix] add config and version files to pass on build info (#856)
* experiment with config file

* experiment with version.h config

* add more info to version.h

* minor updates

* minor updates

* fix case where DTYPE is not used

* large amount of files but minor changes

* remove white space

* minor changes to add more MACROs

* fix cmakedefine01

* fix issue with CK internal conflict

* fix define and define value

* fix clang-format

* fix formatting issue

* experiment with cmake

* clang format v12 to be consistent with miopen

* avoid clang-format for config file

[ROCm/composable_kernel commit: c8a8385fdd]
2023-08-23 11:36:17 -07:00
Qianfeng
b0bd6e3895 Add workspace setting up for batchnorm bwd/fwd client examples (#860)
[ROCm/composable_kernel commit: 350d64f351]
2023-08-24 01:13:07 +08:00
Illia Silin
d81ec56b52 use correct data types in cmake conditions for splitk gemm example (#862)
[ROCm/composable_kernel commit: 7c71dc7e70]
2023-08-23 09:52:11 -07:00
zjing14
d91fc00427 add generic instances (#858)
Co-authored-by: Jing Zhang <jizha@amd.com>

[ROCm/composable_kernel commit: 8ebea3a56e]
2023-08-23 09:18:10 -05:00
zjing14
3d88622dda Ck profiler splitk (#857)
* updated regular gemm

* update ckProfiler

* fixed gtests

---------

Co-authored-by: Jing Zhang <jizha@amd.com>

[ROCm/composable_kernel commit: ca3115e7e8]
2023-08-22 16:54:34 -07:00
Bartłomiej Kocot
80659b5bc1 Fix transform and instances for grouped conv bwd data (#848)
* Fix transform and instances for grouped conv bwd data

* Add instances for small K and small C

* Remove workaround after fix

* Fix interface tests

[ROCm/composable_kernel commit: 595d23be14]
2023-08-22 11:25:41 -05:00
Rostyslav Geyyer
6f9eeb3190 Add instances/ckProfiler/client example for fp8/fp16 mixed precision Gemm (#853)
* Add ComputeType arg to splitk device and gridwise ops

* Update for gridwise op compatibility

* Update bf16 and int8 splitk gemm examples with ComputeType

* Add instances

* Update ckProfiler for mixed precision cases

* Add a mixed precision splitK gemm client example

---------

Co-authored-by: zjing14 <zhangjing14@gmail.com>

[ROCm/composable_kernel commit: eac50708d9]
2023-08-22 09:34:49 -05:00
cloudhan
9bdc6209c4 Use asynchronous version of hipMemset (#850)
[ROCm/composable_kernel commit: d52ec01652]
2023-08-18 11:14:59 +08:00
Bartlomiej Wroblewski
460756b64d Fix datatype in inner_product when V_DOT2 is disabled (#849)
[ROCm/composable_kernel commit: 32fe996da0]
2023-08-17 10:54:11 -05:00
Bartlomiej Wroblewski
f81eb31934 Implement DPP8 based GEMM for Navi21 (#826)
[ROCm/composable_kernel commit: d4c84256f7]
2023-08-14 15:46:27 -05:00
rocking
ae36ead7f5 Refactor pool fwd (#815)
* Do not hardcode stride

* devicePool2DFwd Inherit devicePool3DFwd

* Move instance declaration out of common

* Add dilation

* use the pool3d rank, because pool2d inherit pooo3d

* calculate Do Ho Wo for the dilation

* Fix header name

* Modify ckProfiler

* Remove pool2d instance

* Remove pool2d in profiler

* Remove pool2d and add dilation

* In to client example, this commit revise following:
1. Add dilation.
2. Use pool3d to implement pool2d

* Refine naming and IsSupportedArgument()

* Add dilation to maxpool bwd example

* clang format

* 1. Remove useless header
2. Fix copyright
3. Refine naming

* Add layout parameter to pool fwd

* clang format

* Fix merge error

* Fix compile error

* Remove layout parameter in derived class

* Refine changlog

* Fix compile error

* Fix compiler error

* Add layout to external api and profiler

[ROCm/composable_kernel commit: f60f0a5e03]
2023-08-15 02:25:28 +08:00
rocking
9c24b3c23e Add Normalization splitk instances (#829)
* Add normalization splitK to layernorm and groupnorm instances

* Fix bug of GetKPerThread()

* Refine naming

* clang format

[ROCm/composable_kernel commit: 03b8119e2e]
2023-08-12 01:31:31 +08:00
dependabot[bot]
80813153ad Bump rocm-docs-core from 0.10.3 to 0.20.0 in /docs/sphinx (#844)
* Bump rocm-docs-core from 0.10.3 to 0.20.0 in /docs/sphinx

Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.10.3 to 0.20.0.
- [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.10.3...v0.20.0)

---
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>

* set min version of rocm-docs-core

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Wu <sam.wu2@amd.com>

[ROCm/composable_kernel commit: a5343db00d]
2023-08-11 11:27:56 -06:00
Illia Silin
02fa65753c Add the rocm5.7 RC1 compiler and use it for QA builds. (#842)
* add docker for rocm5.7 RC1

* fix rocm5.7 rc1 build

* build QA with rocm5.7 rc1 compiler

[ROCm/composable_kernel commit: 6237bd1247]
2023-08-10 09:25:21 -07:00
rocking
b42f79dffb Average pool backward deviceOP and example (#797)
* Add avgpool bwd reference code

* Refine naming

* Fix invalid in_element op in ref_conv

* Add example (only reference now)

* Add the full example of avgpool bwd

* Fix copyright

* Imitate MakeDescriptor from  transform_conv_bwd_data_to_gemm_v1.hpp

* rename channel to c from k

* Arrange the code

* Imitate the argument from conv bwd

* Implement invoker

* Fix order of parameter in example

* Refactor reference code for different dimension

* Support different stride

* Check if argument is valid

* Fix kernel parameter for NDHWC, fastest dimension C is not reduced

* Add more data type in example

* Fix bug in example

* calculate Do Ho Wo according to the dilation

* Remove useless header

* Add comment in reference code

* Add layout parameter

* Remove layout in derived class

* Refine reference comment

[ROCm/composable_kernel commit: 578142db3a]
2023-08-10 12:04:35 +08:00
Illia Silin
3e4971dbea Update the rocm version threshold to apply the -fno-offload-uniform-block flag. (#839)
* add fno-offload-uniform-block flag for rocm5.7 and up

* add a comment and compiler ticket number

* update the threshold rocm version

[ROCm/composable_kernel commit: cbbd172fd6]
2023-08-09 13:50:04 -07:00
Illia Silin
c27b2d74b8 Update the list of contributors. (#836)
* add linting and update contributors list

* skip the linting and doc changes

* add Astha

* add YanXing

[ROCm/composable_kernel commit: 1b7da171c9]
2023-08-09 13:44:13 -07:00
Illia Silin
1d3917e60e add gfx941 to the ckProfiler package (#840)
[ROCm/composable_kernel commit: 9af519ee86]
2023-08-09 10:30:40 -07:00
Bartłomiej Kocot
ac574360c7 Enable grouped conv with small K or C (#822)
* Enable grouped conv with small K or C

* Add missing instances

* Refactor grouped conv fwd instances

* Fix fp16 instances since it supports src_per_vec %2 = 0

* Add generic instances

[ROCm/composable_kernel commit: 472fa029ba]
2023-08-09 10:40:55 -05:00
Rostyslav Geyyer
5aa5116e9b Enable f16/f8 mixed precision mode (#820)
* Enable f16/f8 mixed precision

* Add an argument to enable mixed precision

* Update for compatibility

* Add mixed precision example

* Introduce ComputeType argument

[ROCm/composable_kernel commit: 9c54eaab04]
2023-08-09 08:44:23 -05:00
Illia Silin
757145faa9 add no-offload-uniform-block flag for rocm5.7 and up (#838)
* add -fno-offload-uniform-block flag for rocm5.7 and up

* add a comment and compiler ticket number

[ROCm/composable_kernel commit: 6802611334]
2023-08-08 17:58:31 -07:00
Illia Silin
4bea06a519 Allow building CK for specific data types and split off last remaining DL instances. (#830)
* properly split conv_nd_bwd_data instances

* split conv2d_fwd instance data types

* split the gemm, conv2d_fwd and batched_gemm_softamx_gemm

* split the tests by data types where possible

* filter examples by DTYPES

* split few remaining examples by DTYPES

* filter most instances by DTYPES

* add new lines at end of headers, fix grouped_gemm profiler

* fix syntax

* split the ckprofiler instances by DTYPES

* split the conv2d and quantization DL and XDL instances

* fix the splitting of conv2d DL instances

* split softmax and pool_fwd tests for fp16 and fp32 types

* fix syntax

* fix the dl_int8 quantization instances isolation

[ROCm/composable_kernel commit: 08eb176929]
2023-08-07 14:56:10 -07:00
Bartłomiej Kocot
50dbce5272 Add wei_strides to grouped conv3d wei to keep consistency (#817)
* Add wei_strides to grouped conv3d wei to keep consistency

* Fix strides in client examples

* Unify backward weight api with forward

* Fix for example

* Fixes for examples

---------

Co-authored-by: zjing14 <zhangjing14@gmail.com>

[ROCm/composable_kernel commit: 22443f7aae]
2023-08-07 10:23:45 -05:00
Illia Silin
446a0cb807 add an option to build ckProfiler package for specific architectures (#828)
[ROCm/composable_kernel commit: 2474dddbee]
2023-08-03 10:10:27 -07:00
Bartlomiej Kocot
3b27ef7a8c Change to github_issue prefix
[ROCm/composable_kernel commit: aac65a031e]
2023-08-03 16:38:28 +02:00
Bartlomiej Kocot
d91003ad62 Rename the workaround to a proper issue name
[ROCm/composable_kernel commit: e6a826d35a]
2023-08-03 16:38:28 +02:00
Bartlomiej Wroblewski
4d1af87d35 Improve formatting of docs; Add a note about the DL_KERNELS flag (#825)
* Improve formatting of docs; Add a note about the DL_KERNELS flag

* Change the recommended version of ROCm to 5.6

[ROCm/composable_kernel commit: 8c13df07bf]
2023-08-03 15:50:38 +02:00
Po Yen Chen
60371ab663 Update tuning parameter & compilation options of DeviceGemmXdl<> instance (layout=TT) (#819)
* Enable pipeline v2 opt for layout=TT instance

* Use better thread mapping for reading A tile

* Conditionally enable pipeline v2 opt

* Allow enabling only fp16 gemm instances in profiler

* Fix formatting error

* Fix compilation error if we enable fp32 in profiler

[ROCm/composable_kernel commit: f7cc8c3b03]
2023-08-02 10:32:22 -05:00
Bartłomiej Kocot
9996b8c375 Add s_nops after v_dot to avoid hazard (#808)
* Add s_nops after v_dot to avoid hazard

* Fix builtin for inner_produxt fp16

* Skip inline version to builtin

* Add comments regarding isa

* Fix comment regarding s_nop

[ROCm/composable_kernel commit: 7761e5232c]
2023-07-27 13:29:44 -05:00
carlushuang
836a29fcd8 initial stream-k implementation with example (#699)
* initial stream-k implementation with example

* fix unexpected change in err

* improve a little bit performance by reorganize pipeline.

* improve perf a little bit by swizzle block idx

* add profiler

* update example

* fix spelling

* shrink karg for streamk

* support dynamic buffer using memory coherence glc_slc bit from template

* control memory coherence while construct dynamic buffer

* update reduction for streamk(not ready yet)

* Add template parameter to make_dynamic_buffer to support amd_buffer coherence setting

* fix build issue

* fix several bug

* now result is correct, everything works (but has scratch)

* remove scratch by manually reset coordinate

* update device code

* fix a bug in final reduce

* fix something in example

* update async memset

* fix enum as camel case

* modify coherence enum name

* clean code and use atomic streamk by default

* remove unused var

* throw exception if have empty pointer

* fix format

* fix CI warning

* fix type in init

* modify CI error

* filter out on gfx10+

* restore changed example code

---------

Co-authored-by: Qianfeng Zhang <Qianfeng.Zhang@amd.com>

[ROCm/composable_kernel commit: e7dca79d27]
2023-07-26 14:18:15 -05:00
Illia Silin
fe77d721fb Disable DL kernels by default. (#816)
[ROCm/composable_kernel commit: 9195435c77]
2023-07-26 11:06:45 -05:00
Bartłomiej Kocot
ffc13df816 Disable XDL kernels on unsupported HW Add ck::is_xdl_supported (#768)
* Disable XDL kernels on unsupported HW; Add ck::is_xdl_supported function (#765)

* Do not throw an error when GEMM problem is not supported.

---------

Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>
Co-authored-by: Adam Osewski <aosewski@amd.com>
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>

[ROCm/composable_kernel commit: ac6d68b353]
2023-07-26 07:19:55 -07:00
rocking
0d1c54d385 Refine the dimension of host tesnor. This example only require 1D (#812)
[ROCm/composable_kernel commit: 016bd428df]
2023-07-25 23:18:56 -05:00
Po Yen Chen
26cfd12dec Speed-up global memory reading for GEMM instances (#813)
* Use better ThreadClusterLengths to speed up

* Update B tile reading pattern for layout=NN instance

[ROCm/composable_kernel commit: f4ea560112]
2023-07-25 18:54:47 -05:00
ltqin
714fc59909 Add bias scalar vectorload = 1 for gemm bias gemm (#791)
* first change bias load

* add bias dim and scalervector parameter

* make CDE0BlockTransferSrcVectorDim not work

* changse toinstance

* add limit for CDE0BlockTransferSrcScalarPerVector

[ROCm/composable_kernel commit: 50643dd555]
2023-07-24 20:08:15 -05:00
Illia Silin
5834ec5e00 add ninja profiling tools to the base docker (#805)
[ROCm/composable_kernel commit: 844b215d92]
2023-07-21 15:33:17 -07:00
Illia Silin
ba2d3c851b add INSTANCES_ONLY cmake macro to build only instances (#807)
[ROCm/composable_kernel commit: 7a29f711d4]
2023-07-21 15:31:19 -07:00
Bartłomiej Kocot
9eb711b9d2 Grouped conv bwd wei NDHWGC/NDHWGK (#804)
[ROCm/composable_kernel commit: 10732847e7]
2023-07-21 12:00:55 -05:00
Bartłomiej Kocot
686ad6b543 Grouped 3d conv backward data support (#799)
* Grouped 3d conv backward data support

* Fix comments

[ROCm/composable_kernel commit: 49180fd60b]
2023-07-18 11:01:33 -05:00
Rostyslav Geyyer
78ebad1588 Remove type_convert bf16 to int32 and back (#802)
[ROCm/composable_kernel commit: f82bd59389]
2023-07-18 09:44:51 -05:00
Illia Silin
67b2baf9c1 Add mechanism to build CK for select data types, add Navi3x CI. (#790)
* allow building CK for specific data types

* add CI build and test stage on Naiv3x without some int8 instances

* add missing gemm fp16 instances

* add the changes to the missed cmake file

* add empty lines at end of source files

* Do not build quantization client example on navi3 in CI

* disable batched_gemm_multi_d_int8 instances with DTYPES

* disable device_conv2d_bwd_data_instance with DTYPES

* fix ckprofiler for conv_bwd_data for int8

* properly isolate the conv_bwd_data int8 instances

* remove empty line

[ROCm/composable_kernel commit: 189ea3b9aa]
2023-07-17 18:02:42 -07:00
Illia Silin
d5c138643c Add check for compiler GPU target support. (#800)
* check if gpu_targets are supported by compiler

* set default list of targets and filter for them

[ROCm/composable_kernel commit: 4867db4290]
2023-07-17 09:44:40 -07:00
arvindcheru
93493c2745 Disable Werror to ignore xnack+ warnings (#794)
* Disable Werror to ignore xnack+ warnings

[ROCm/composable_kernel commit: 03d3395b3c]
2023-07-14 20:00:20 -04:00
Bartłomiej Kocot
a1a8901df8 Support NHWGC conv2d_bwd_weight (#769)
* Support NHWGC conv2d_bwd_weight

* Fix client example

* Fix client example

* Fix comments

* Redesign grouped_conv_bwd_weight instances

* Clang format fix

---------

Co-authored-by: zjing14 <zhangjing14@gmail.com>

[ROCm/composable_kernel commit: 1ee99dcaa6]
2023-07-12 08:25:02 -05:00
Illia Silin
04ea8b4ec2 change the build thread usage in CI (#787)
[ROCm/composable_kernel commit: 87f2bbcf5c]
2023-07-06 20:17:25 -05:00
Adam Osewski
f50d614447 Add basic setup for precommit (#749) (#764)
* Add basic setup for precommit

* Update README.md with instructions on installing precommit hooks

---------

Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>

[ROCm/composable_kernel commit: 237f9cd3aa]
2023-07-06 11:01:06 -05:00
Po Yen Chen
7308ac2436 Split GEMM instance library & enable pipeline v2 optimization (#783)
* Move source file into sub-directories

* Add missing include directive

* Split DeviceGemmXdl<> fp16 instances

* Fix format

* Remove unnecessary CMakeLists.txt

* Add macros to toggle new features

* Remove debug message

* Turn off GEMM v2 pipeline optimization by default

* Fix format

* Extract duplicated string as list

* Enlarge indent in CMakeLists.txt

[ROCm/composable_kernel commit: 850144a0d3]
2023-07-06 10:59:35 -05:00
Qianfeng
ce225372d7 Batchnorm splitk single kernel (#771)
* Use dim 0 as faster dim for writing mean/var/count workspace in batchnorm multiblock method [performance]

* Add CountDataType as template parameter in blockwise_welford

* Add utility/get_shift.hpp

* Add BatchNorm multiblock single-kernel implementation

* Add smem inline assembly based implementation of gms_init/gms_barrier/gms_reset for gfx90a

* Renaming in device_batchnorm_forward_impl.hpp

* Tiny fix in the batchnorm_fwd profiler

* Revert "Add smem inline assembly based implementation of gms_init/gms_barrier/gms_reset for gfx90a"

This reverts commit d16d00919c.

* Use the old two-kernel batchnorm multiblock method for gfx1030

* Use the old two-kernel batchnorm multiblock method for gfx908

* use the single-kernel batchnorm multiblock method only for gfx90a

* Remove get_wave_id() from utility/get_id.hpp since it is not used

* Set true for testing running mean/variance and saving mean/invvariance in the examples

* Fix to copy-right words

* Remove un-needed including in utility/get_id.hpp

* Add comments to workgroup_synchronization.hpp

* Remove un-used codes in gridwise_multiblock_batchnorm_forward.hpp

* Renaming in the kernels

* Remove un-used kernel file

[ROCm/composable_kernel commit: 8f5cafaf04]
2023-07-06 10:58:55 -05:00
Adam Osewski
5c2c77a439 Move Device Ops implementations into impl directory. (#777)
Co-authored-by: Adam Osewski <aosewski@amd.com>
Co-authored-by: zjing14 <zhangjing14@gmail.com>

[ROCm/composable_kernel commit: f4dfc060b7]
2023-07-06 16:15:51 +02:00