1. 23 Feb, 2022 3 commits
    • Chao Liu's avatar
      Add gridwise GEMM pipeline (#89) · 22d438ae
      Chao Liu authored
      * clean up
      
      * add mutilple thread scratch to ThreadwiseTensorSliceTransfer_v3r1
      
      * add 2 stage prefetch
      
      * add more sanity check into transform_tensor_descriptor
      
      * tweak
      
      * enabling 2 stage prefetch to exsiting gridwise gemm; tweak
      
      * enabling 2 stage prefetch to exsiting gridwise gemm
      
      * move gridwise gemm pipeline in class; clean up
      
      * add some irregular tile size
      
      * update CalculateHasMainK0BlockLoop for multi-stage-prefetch
      
      * refactor gridwise gemm pipeline class
      22d438ae
    • Adam Osewski's avatar
      Unify Convolution FWD XDL 1D/2D implementation. (#93) · 756a7617
      Adam Osewski authored
      
      
      * Convolution ND
      
      * Code unification across dimensions for generating tensor descriptors.
      * Example
      * Instances
      
      * Move convnd f32 instance file to comply with repo structure.
      
      * Conv 1D tensor layouts.
      
      * Formatting and use ReferenceConv
      
      * Reference ConvFwd supporting 1D and 2D convolution.
      
      * Debug printing TensorLayout name.
      
      * Conv fwd 1D instance f32
      
      * Refactor conv ND example.
      
      Needed to support various conv dimensio.
      
      Needed to support various conv dimensions
      
      * Rename conv nd example director to prevent conflicts.
      
      * Refactor some common utility to single file.
      
      Plus some tests.
      
      * Refactor GetHostTensorDescriptor + UT.
      
      * Add 1D test case.
      
      * Test reference convolution 1d/2d
      
      * Remove some leftovers.
      
      * Fix convolution example error for 1D
      
      * Refactor test check errors utility function.
      
      * Test Conv2D Fwd XDL
      
      * More UT for 1D case.
      
      * Parameterize input & weight initializers.
      
      * Rename example to prevent conflicts.
      
      * Split convnd instance into separate files for 1d/2d
      
      * Address review comments.
      
      * Fix data type for flops/gbytes calculations.
      
      * Assign example number 11.
      Co-authored-by: default avatarAdam Osewski <aosewski@amd.com>
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      756a7617
    • Jianfeng Yan's avatar
      Conv3d new (#94) · 6dfb92bb
      Jianfeng Yan authored
      
      
      * conv3d compiles but has memory error
      
      * conv3d works
      
      * fix performance issue by using __builtin_amdgc_readfirstlane
      
      * change MakeBlock2CTileMap to MakeDefaultBlock2CTileMap; change c_blockid_to* to cblockid_to*
      
      * clang-format
      
      * remove CK_EXPERIMENTAL_PASS_TENSOR_DECRIPTOR_BY_*; moved wrapper into DeviceConv3d
      
      * format
      
      * remove useless marc
      
      * add comment
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      6dfb92bb
  2. 21 Feb, 2022 1 commit
  3. 19 Feb, 2022 1 commit
    • JD's avatar
      Initial Setup for CI (#86) · 2778e997
      JD authored
      
      
      * add docker file and make default target buildable
      
      * add Jenkinsfile
      
      * remove empty env block
      
      * fix package stage
      
      * remove render group from docker run
      
      * clean up Jenkins file
      
      * add cppcheck as dev dependency
      
      * update cmake file
      
      * Add profiler build stage
      
      * add hip_version config file for reduction operator
      
      * correct jenkins var name
      
      * Build release instead of debug
      
      * clean up
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      2778e997
  4. 12 Feb, 2022 1 commit
    • ltqin's avatar
      NHWC conv 2d: fwd bfp16/int8, Device level tuning and host API (#73) · 880fbee9
      ltqin authored
      
      
      * add fwd bf16 conv
      
      * change tunning parametor
      
      * add int8 for conv fwd
      
      * remove comments
      
      * change tunning parametor for int8
      
      * change init int8 example
      
      * add test for conv2d fwd
      
      * change device operation file pos because merge develop
      
      * fwd int8 use reference
      
      * test_conv_fwd use reference
      
      * add braket for if statement
      
      * rename fwd example name
      
      * remove StaticBufferOfVectorTypeV2
      
      * tweak example
      Co-authored-by: default avatarltqin <letaoqin@amd.com>
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      880fbee9
  5. 11 Feb, 2022 4 commits
    • zjing14's avatar
      Add small tile size for fp16/fp32 and NN layout (#80) · 20a672d0
      zjing14 authored
      
      
      * add DeviceGemmSplitKXdl
      
      * add file device_gemm_splitk_xdl.hpp
      
      * set c matrix zero
      
      * using atomic
      
      * add all tuning parameter to f32 mkkn
      
      * grid size change to 720
      
      * add tunning parameter for NT
      
      * add tunning parameter for TN
      
      * add tunning parameter for TT
      
      * add m=96tunning parameter
      
      * add lost config
      
      * debug
      
      * fix sweep
      
      * add failed tuning params
      
      * fixed sweep logic
      
      * clean
      
      * add padding to M/N for irr tile size
      
      * clean code
      
      * add element wise operation
      
      * fixed MPerBlock=96
      
      * remove marco for slpitk swtich
      
      * add test
      
      * add new line at the end of device_gemm_xdl_instance.hpp
      
      * remove step hack
      
      * seperate split-k instance files
      
      * add tunning parameters
      
      * change disired grid size to parameters
      
      * remove slice length
      
      * add desiredgridsize parameter to ckProfiler
      
      * add losting file device_gemm_xdl_splitk_instance.hpp
      
      * change desired gride size to kbatch
      
      * format
      
      * format
      
      * clean up
      
      * add selection of device_instances
      
      * clean code
      
      * clean code
      
      * add small tile size in fp16 nn
      
      * test for rocm 4.5
      
      * merge develop
      
      * clean
      
      * clean
      
      * clean
      
      * remove no-use code
      
      * add padding switch to device_gemm_xdl
      
      * add padding switch for ksplit fp32
      
      * clean
      
      * clean
      
      * add files
      
      * rename
      
      * Update profiler.cpp
      
      * format
      Co-authored-by: default avatarltqin <letaoqin@amd.com>
      Co-authored-by: default avatarltqin <letao.qin@amd.com>
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      20a672d0
    • zjing14's avatar
      Batched GEMM for fp16 (#79) · b53e9d08
      zjing14 authored
      * prepare host for batched_gemm
      
      * init commit of batched kernels
      
      * fixed
      
      * refine transform with freeze
      
      * m/n padding
      
      * fixed a bug; clean
      
      * add small tiles
      
      * clean
      
      * clean code
      
      * clean code
      
      * add nt, tn, tt layout
      
      * add missing file
      
      * use StaticBufferTupleOfVector instead
      
      * add reference_batched_gemm
      
      * fixed a macro
      b53e9d08
    • rocking5566's avatar
      Support alpha beta scaling for GEMM (#78) · 6f928a08
      rocking5566 authored
      
      
      * [What] Add 2d version of bias, prepare to implement alpha / beta scaling
      
      * Add alpha / beta functor
      
      * Refine parameter of example
      
      * [What] Use real type instead of template
      [Why] Prevent implicit cast
      
      * Rename parameter for general operator
      
      * Remove redundant comment
      
      * Fix compile error
      Co-authored-by: default avatarrocking <chunylai@amd.com>
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      6f928a08
    • Anthony Chang's avatar
      fix build breaks (#81) · 904cbe2a
      Anthony Chang authored
      
      
      - device_gemm_xdl_c_shuffle function signature matches split-k
      - retire host_driver since it is no longer maintained
      - linter error (unused variable)
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      904cbe2a
  6. 07 Feb, 2022 1 commit
    • Chao Liu's avatar
      GEMM+Bias+ReLU+Add (#76) · 823657ed
      Chao Liu authored
      * tweak conv for odd C
      
      * update script
      
      * clean up elementwise op
      
      * fix build
      
      * clean up
      
      * added example for gemm+bias+relu+add
      
      * added example for gemm+bias+relu
      
      * add profiler for gemm_s_shuffle; re-org files
      
      * add profiler
      
      * fix build
      
      * clean up
      
      * clean up
      
      * clean up
      
      * fix build
      823657ed
  7. 04 Feb, 2022 1 commit
  8. 03 Feb, 2022 2 commits
    • zjing14's avatar
      Replace llvm Intrinsics with clang buildins (#65) · 6d92959a
      zjing14 authored
      * test mfma builtins
      
      * add fp16 buildins
      
      * add int8 buildins
      
      * add bfl16 buildins
      
      * simplify host conv forward
      
      * clean
      
      * clean
      6d92959a
    • ltqin's avatar
      add split-k GEMM (#59) · 4be7f019
      ltqin authored
      
      
      * add DeviceGemmSplitKXdl
      
      * add file device_gemm_splitk_xdl.hpp
      
      * set c matrix zero
      
      * using atomic
      
      * add all tuning parameter to f32 mkkn
      
      * grid size change to 720
      
      * add tunning parameter for NT
      
      * add tunning parameter for TN
      
      * add tunning parameter for TT
      
      * add m=96tunning parameter
      
      * add lost config
      
      * add element wise operation
      
      * fixed MPerBlock=96
      
      * remove marco for slpitk swtich
      
      * add test
      
      * add new line at the end of device_gemm_xdl_instance.hpp
      
      * remove step hack
      
      * seperate split-k instance files
      
      * add tunning parameters
      
      * change disired grid size to parameters
      
      * remove slice length
      
      * add desiredgridsize parameter to ckProfiler
      
      * add losting file device_gemm_xdl_splitk_instance.hpp
      
      * change desired gride size to kbatch
      
      * format
      
      * format
      
      * clean up
      
      * add selection of device_instances
      
      * clean code
      
      * fix build issue
      Co-authored-by: default avatarltqin <letaoqin@amd.com>
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      Co-authored-by: default avatarJing Zhang <jizhan@amd.com>
      4be7f019
  9. 25 Jan, 2022 1 commit
    • rocking5566's avatar
      Do not hardcode the function parameter, use template instead. (#72) · ca47a6cf
      rocking5566 authored
      * Do not hardcode the function parameter, use template instead.
      
      * [What] Remove AThreadTransferSrcResetCoordinateAfterRun and BThreadTransferSrcResetCoordinateAfterRun in host API
      [Why] "C_Shuffle" version is supposed to be similar to the vanilla one
      
      * Fix typo
      Let DeviceGemmXdl_C_Shuffle use kernel_gemm_xdlops_v3r1
      ca47a6cf
  10. 21 Jan, 2022 1 commit
    • rocking5566's avatar
      Add gemm_shuffle host api (#71) · 4d40b197
      rocking5566 authored
      * [What]
      1. Add DeviceGemmXdl_C_Shuffle
      2. Revise example of gemm_xdl
      [Why] Prepare to add shuffle version of D = alpha * (A * B) + beta * C
      [How] Imitate DeviceGemmXdl and device_conv2d_fwd_xdl_c_shuffle_nhwc_kyxc_nhwk.hpp
      4d40b197
  11. 18 Jan, 2022 1 commit
  12. 26 Dec, 2021 1 commit
    • Chao Liu's avatar
      Fusion Conv+Bias+ReLU(+Add) (#62) · acbd7bd7
      Chao Liu authored
      * fix relu
      
      * clean up
      
      * clean up
      
      * adding 1x1 conv
      
      * adding 1x1 conv
      
      * added 1x1 conv
      
      * refactor
      
      * refactor
      
      * refactor
      
      * added profiler for conv+bias+relu+add
      
      * clean up
      
      * adding conv+bias+relu
      
      * adding conv+bias+relu
      
      * added conv+bias+relu
      
      * Update README.md
      
      * update cpu verification
      
      * adding c shuffle
      
      * update static_tensor for dealing with invalid element
      
      * adding c shuffle
      
      * debugging
      
      * fix bug
      
      * convert to fp16 before shuffle
      
      * shuffle more than one M/NRepeat
      
      * clean up
      
      * remove coordinate step hack from GridwiseGemm_k0mk1_k0nk1_mn_xdlops_v3r1
      
      * clean up
      
      * remove coordinate step hack from all gridwise gemm xdl
      
      * clean up coordinate step hack
      
      * clean up coordinate step hack
      
      * ThreadwiseTensorSliceTransfer_v3r2 support pointwise op on both src and dst
      
      * adding output shuffle in conv+bias+relu+add
      
      * update
      
      * added conv+bias+relu+add with c shuffle
      
      * added conv+bias+relu+add with c shuffle
      
      * fix forward_sweep bugs in threadwise copy
      
      * clean up
      
      * refactor
      
      * clean up
      
      * clean up
      
      * added conv_c_shuffle+bias_relu
      
      * clean up
      
      * added conv+bias+relu+atomic_add
      
      * clean up
      
      * clean up
      
      * clean up
      
      * clean up
      
      * clean up
      
      * clean up
      
      * misc fixes; add 1x1 specialization
      
      * clean up
      
      * delete unused device op
      
      * clean up
      
      * add support for odd C value
      acbd7bd7
  13. 13 Dec, 2021 1 commit
    • Chao Liu's avatar
      manually apply bug fix changes in pr #63 (#64) · a4f24233
      Chao Liu authored
      * Bug in BlockwiseGemmXdlops_k0mk1_k0nk1_m0n0m1n1m2m3m4n2_v1::MakeCGridDescriptor_M0_N0_M1_N1_M2_M3_M4_N2()
      * Bug in ThreadwiseTensorSliceTransfer_v1r3 logic for calculating "forward_sweep"
      a4f24233
  14. 04 Dec, 2021 1 commit
  15. 03 Dec, 2021 1 commit
    • Chao Liu's avatar
      GEMM/Conv+BiasAdd+ReLU+Add (#55) · 41cdd380
      Chao Liu authored
      * gemm+activation
      
      * move C pointwise operation into threadwise copy
      
      * add pointwise operation to A/B matrix
      
      * update ckProfiler
      
      * adding bias add
      
      * adding bias add
      
      * adding bias add
      
      * added bias add; worked around compiler issues
      
      * clean up
      
      * clean up
      
      * Update README.md
      
      * Update README.md
      
      * Update README.md
      
      * clean up
      
      * add conv_xdl example
      
      * adding conv_xdl_bias_relu_add example
      
      * add conv+bias+relu+add, but has register spill issue
      
      * tweak
      
      * tweak
      
      * refactor
      
      * Update README.md
      
      update readme for example/2_gemm_xdl_bias_relu_add
      
      * clean up
      
      * Update README.md
      
      update readme for example/3_conv_xdl
      
      * Update README.md
      41cdd380
  16. 02 Dec, 2021 3 commits
  17. 30 Nov, 2021 2 commits
  18. 24 Nov, 2021 1 commit
  19. 18 Nov, 2021 3 commits
    • Chao Liu's avatar
      Use __builtin_memcpy to implement bit_cast and for accessing vector from pointer of scalars (#53) · 64350aff
      Chao Liu authored
      * reworking vector_type
      
      * use __builtin_memcpy for bit_cast and vector access of scalar pointer
      
      * clean up
      64350aff
    • zjing14's avatar
      v5r1 fusion kernels for inference (#49) · 970fa3e9
      zjing14 authored
      
      
      * init
      
      * refactor for 1x1
      
      * rename e0_e1
      
      * add e1 with bugs
      
      * debug
      
      * fixed
      
      * fixed e1
      
      * add timer
      
      * imprve threadwise gemm with dot2
      
      * add e2
      
      * tuning
      
      * seperate c2
      
      * add nhwc
      
      * restore nchwc
      
      * clean
      
      * opt
      
      * fixed; tuning
      
      * add BGlobalMoveSliceWindowStepHacks{}
      
      * tuning
      
      * repeat running
      
      * adjust
      
      * merge v5r1 nchwc
      
      * add adaptors
      
      * split k0 k1 in c_thread_grid
      
      * split h and w
      
      * remove v5r1 nhwc
      
      * clean for pr
      
      * remove host_conv_add
      
      * clean code
      
      * clean
      
      * add dynamic support
      
      * static mode
      
      * test static
      
      * add conv+add fusion
      
      * fixed validation
      
      * naming fix
      
      * use activ_enum
      
      * make static
      
      * refactor conv_add for InMem::add
      
      * add bias
      
      * add conv_out
      
      * add configurable makeddesc
      
      * add maxpool fusion
      
      * add maxpool host for validation
      
      * enable static desc
      
      * conv-only use v5r1_add
      
      * test
      
      * test
      
      * for binary dumps
      
      * fixed incorrect results due to typo
      
      * clean
      
      * debugging maxpool
      
      * workaround with offset trick
      
      * clean code
      
      * modularize ops of fusion
      
      * add gridwise_gemm_v3
      
      * create seperate fusion fun
      
      * enable dynamic mode of conv and conv+resize_add
      
      * add dynamic mode of maxpool
      
      * add pass by point
      
      * add activ_type as arguments
      
      * merge develop
      
      * clean
      
      * reset config to old default
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      970fa3e9
    • zjing14's avatar
      Fixed bfp16 host_conv_fwd (#52) · a651ea4f
      zjing14 authored
      
      
      * fixed bfloat16 issues
      
      * refactor type_convert
      
      * fixed host_convolution_forward for ushort
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      a651ea4f
  20. 16 Nov, 2021 2 commits
  21. 15 Nov, 2021 2 commits
    • zjing14's avatar
      Add bfp16/int8 support into XDL GEMM operator (#50) · 3737bb03
      zjing14 authored
      
      
      * init StaticBufferV2
      
      * clean
      
      * adopt old output stage for staticBufferV2
      
      * clean
      
      * remove hack
      
      * clean
      
      * clean
      
      * add parameters
      
      * clean code
      
      * move c_buffer alloc into blockwise gemm
      
      * add adaptors for m/n_thread_data_on_grid
      
      * tweak gemm
      
      * adjust blockwise_gemm_xdlops
      
      * tweak
      
      * update conv
      
      * update script
      
      * adding bwd 1x1
      
      * update script
      
      * adding 1x1 bwd
      
      * debugging bwd 1x1 failure
      
      * update script
      
      * update script
      
      * test
      
      * test v100
      
      * add bf16_1k
      
      * clang-format
      
      * clean
      
      * add bfp16 for gfx908
      
      * add verification
      
      * clean up
      
      * clean code
      
      * restore bfl16
      
      * clean
      
      * add bfp16 support into gemm_driver
      
      * apply new generator to other drivers
      
      * add int8 support
      
      * cleanb
      
      * clean
      
      * clean
      
      * clean
      Co-authored-by: default avatarChao Liu <chao.liu2@amd.com>
      Co-authored-by: default avatarChao Liu <lc.roy86@gmail.com>
      Co-authored-by: default avatarroot <root@hayabusa6111.amd.com>
      3737bb03
    • Chao Liu's avatar
      FP16 data in-register transpose (#41) · b491ebf3
      Chao Liu authored
      * start fixing 16bit data packing
      
      * adding StaticTensor
      
      * adding StaticTensor
      
      * adding StaticTensor
      
      * add missing constexpr
      
      * adding static tensor
      
      * adding static tensor
      
      * adding transpose
      
      * add inline asm for transpose 2x2 of half_t
      
      * add general transpose_vectors(), but have unnecessary register initialization using v_mov
      
      * fix unnecessary register initialization in transpose_vector by using more pass-by-reference
      
      * add hardcoded logic for NHWC wrw
      
      * improve asm for v_pack
      
      * make ThreadwiseTensorSliceTransfer_v3r2 support any tensor
      
      * tweak
      
      * reorganize file
      b491ebf3
  22. 14 Nov, 2021 1 commit
    • Chao Liu's avatar
      ckProfiler and device-level XDL GEMM operator (#48) · e823d518
      Chao Liu authored
      * add DeviceGemmXdl
      
      * update script
      
      * fix naming issue
      
      * fix comment
      
      * output HostTensorDescriptor
      
      * rename
      
      * padded GEMM for fwd v4r4r4 nhwc
      
      * refactor
      
      * refactor
      
      * refactor
      
      * adding ckProfiler
      
      * adding ckProfiler
      
      * refactor
      
      * fix tuning parameter bug
      
      * add more gemm instances
      
      * add more fp16 GEMM instances
      
      * fix profiler driver
      
      * fix bug in tuning parameter
      
      * add fp32 gemm instances
      
      * small fix
      
      * refactor
      
      * rename
      
      * refactor gemm profiler; adding DeviceConv and conv profiler
      
      * refactor
      
      * fix
      
      * add conv profiler
      
      * refactor
      
      * adding more GEMM and Conv instance
      
      * Create README.md
      
      Add build instruction for ckProfiler
      
      * Create README.md
      
      Add Readme for gemm_xdl example
      
      * Update README.md
      
      Remove build instruction from top most folder
      
      * Update README.md
      
      * clean up
      e823d518
  23. 27 Oct, 2021 3 commits
  24. 26 Oct, 2021 1 commit
  25. 21 Oct, 2021 1 commit