Commit Graph

969 Commits

Author SHA1 Message Date
Lauren Wrubleski
766b5dc9d7 Fix config header installation (#880)
[ROCm/composable_kernel commit: bd8024b84a]
2023-09-04 09:49:40 -07:00
zjing14
c79ecbccfb Grouped Gemm with Fixed K and N with SplitK (#818)
* move all arguments into device

* add b2c_tile_map

* add examples

* add SetDeviceKernelArgs

* dedicated fixed_nk solution

* init client api

* add grouped_gemm_bias example

* add a instance

* add instances

* formatting

* fixed cmake

* Update EnableCompilerWarnings.cmake

* Update cmake-ck-dev.sh

* clean; fixed comments

* fixed comment

* add instances for fp32 output

* add instances for fp32 output

* add fp32 out client example

* fixed CI

* init commit for kbatch

* add splitk gridwise

* format

* fixed

* clean deviceop

* clean code

* finish splitk

* fixed instances

* change m_loops to tile_loops

* add setkbatch

* clean code

* add splitK+bias

* add instances

* opt mk_nk instances

* clean examples

* fixed CI

* remove zero

* finished non-zero

* clean

* clean code

* optimized global_barrier

* fixed ci

* fixed CI

* removed AddBias

* format

* fixed CI

* fixed CI

* move 20_grouped_gemm to 21_grouped_gemm

---------

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

[ROCm/composable_kernel commit: f5ec04f091]
2023-08-31 09:22:12 -05:00
rocking
0b07461518 MaxPool & AvgPool bwd instances, test, ckProfiler, client example (#861)
* Add maxpool instances

* Rename index pool to max pool.

* Add maxpool bwd bf16 instances

* Add avg pool bwd instances

* Rename avgpool and maxpool to avg_pool3d and max_pool

* Add bf16 pool fwd instances

* Add max pool bwd to ckProfiler

* Add avg pool3d bwd to ckProfiler

* Add avg pool bwd test

* Fix bug of reference pool fwd (dilation)

* Fix bug of max pool bwd  (dilation and initZero)

* Support bf16 compute data type

* Force compute type be f32. Because atomicAdd only support f32

* Add max pool bwd test

* Rename folder

* Rename pool

* Add max pool bwd client example

* Add avg pool bwd client example

* Add missing workspace

* clang format

* Rename macro

* remove useless header

* remove useless layout

[ROCm/composable_kernel commit: 866377de18]
2023-08-31 21:01:50 +08:00
Illia Silin
ddf8b9ac4c fix gemm_streamk example on mi300 (#875)
[ROCm/composable_kernel commit: bf1912ed3d]
2023-08-30 20:18:38 -07:00
Bartłomiej Kocot
63466279a6 Add number of error when fail (#868)
[ROCm/composable_kernel commit: 9e86ebd62d]
2023-08-30 10:33:11 -05:00
zjing14
f8bcfe60ac add an example of customized type convert - bfp16_rtn (#869)
* add an example of customized bfp16_rtn

* fixed threadwise_copy

---------

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

[ROCm/composable_kernel commit: 38ada109ea]
2023-08-29 12:31:24 -05:00
zjing14
90c7e28a8d 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
2fb9a37881 [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
c336d6d3d9 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
d019f82b57 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
d0632afcee 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
af751a689c 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
87b3186c09 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
9ef85a359d 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
2471a6b117 Use asynchronous version of hipMemset (#850)
[ROCm/composable_kernel commit: d52ec01652]
2023-08-18 11:14:59 +08:00
Bartlomiej Wroblewski
7ab6546557 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
d4888118a5 Implement DPP8 based GEMM for Navi21 (#826)
[ROCm/composable_kernel commit: d4c84256f7]
2023-08-14 15:46:27 -05:00
rocking
4ee825732f 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
759fb65188 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]
d9190550d3 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
e8944b43fd 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
59ccb49898 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
33edc7449a 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
75c3bdc4ba 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
e63357c068 add gfx941 to the ckProfiler package (#840)
[ROCm/composable_kernel commit: 9af519ee86]
2023-08-09 10:30:40 -07:00
Bartłomiej Kocot
6493db2758 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
8ef2986dae 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
62bf177e98 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
25efecc13e 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
33496a08cc 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
79481b9486 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
26d32e1bb2 Change to github_issue prefix
[ROCm/composable_kernel commit: aac65a031e]
2023-08-03 16:38:28 +02:00
Bartlomiej Kocot
4818023b6c Rename the workaround to a proper issue name
[ROCm/composable_kernel commit: e6a826d35a]
2023-08-03 16:38:28 +02:00
Bartlomiej Wroblewski
7f7ab0680e 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
b6e54f589e 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
0d0dc5d646 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
92726361e0 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
f83a1c84c3 Disable DL kernels by default. (#816)
[ROCm/composable_kernel commit: 9195435c77]
2023-07-26 11:06:45 -05:00
Bartłomiej Kocot
fc7756d437 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
2949e1aa92 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
b49076fed0 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
79a9ecdc4b 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
88bcb13fe3 add ninja profiling tools to the base docker (#805)
[ROCm/composable_kernel commit: 844b215d92]
2023-07-21 15:33:17 -07:00
Illia Silin
7e00942316 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
4687f4eb2a Grouped conv bwd wei NDHWGC/NDHWGK (#804)
[ROCm/composable_kernel commit: 10732847e7]
2023-07-21 12:00:55 -05:00
Bartłomiej Kocot
b795a0f549 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
7c18e41791 Remove type_convert bf16 to int32 and back (#802)
[ROCm/composable_kernel commit: f82bd59389]
2023-07-18 09:44:51 -05:00
Illia Silin
74c83ffe26 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
2ce9e7a4cf 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
f0ccdd1036 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