1. 18 Aug, 2023 1 commit
  2. 11 Aug, 2023 1 commit
  3. 20 Jun, 2023 1 commit
  4. 12 Jun, 2023 1 commit
    • flyingdown's avatar
      1.修改了readme · f8b650c8
      flyingdown authored
      2.添加环境变量APEX_ROCBLAS_GEMM_ALLOW_HALF用于控制是否使用fp16r
      3.添加dcu版本信息
      
      whl包名修改
      
      readme更新安装步骤
      f8b650c8
  5. 08 May, 2023 1 commit
  6. 23 Apr, 2023 11 commits
    • Pruthvi Madugundu's avatar
      Update rccl header include path (#110) · 2d8b3600
      Pruthvi Madugundu authored
      2d8b3600
    • luise.chen's avatar
      Add FusedLARS optimizer (#109) · e519c1e3
      luise.chen authored
      * Add fused_lars optimizer
      
      * Update primitive fused_lars optimizer, working for resnet50 with NHWC/NCHW
      
      * Add flow of using nesterov in FusedLARS
      e519c1e3
    • Hubert Lu's avatar
      Cherry-picks some commits to replace torch.Tensor and remove dependency on six (#107) · 3d72ea06
      Hubert Lu authored
      
      
      * replace torch.Tensor with torch.empty (#1578)
      
      * replace torch.Tensor with torch.empty
      
      * nit
      
      * nit
      
      * torch.empty() must have args (#1584)
      
      * use `torch.tensor` to create a tensor with initializer values (#1588)
      
      * use `torch.tensor` with init values
      Signed-off-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      
      * Update apex/contrib/sparsity/sparse_masklib.py
      
      * remove torch._six
      Signed-off-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      
      * retire `torch._six`
      
      as per the upstream commit of `b005ec62b9`.
      Signed-off-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      
      * use std collections.abc
      Signed-off-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      
      ---------
      Signed-off-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      
      ---------
      Signed-off-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      Co-authored-by: default avatarNouamane Tazi <nouamane98@gmail.com>
      Co-authored-by: default avatarMasaki Kozuki <mkozuki@nvidia.com>
      3d72ea06
    • aspanday's avatar
      Grid optimization - Chunk_Size optimization. (#104) · 1578c0c7
      aspanday authored
      * Updating BLOCK_SIZE to 1024.
      tests/L0/run_optimizers/test_fused_optimizer.py test passes except for bfloat16 for Adam. There seems to be a bug in this test that needs to be resolved.
      For now skipping test_bfloat16 for Adam in the unittest.
      Ran 17 other tests and ALL other tests pass!
      More details on the effects of these changes can be found here -  https://confluence.amd.com/display/MLSE/Apex+Kernel+Optimization.
      This commit changes BLOCK_SIZE=1024 ONLY FOR different optimizers.
      L2norm kernels (part of LAMB optimizer algorithm) still maintain BLOCK_SIZE=512 otherwise Allclose fails.
      
      * Updating tests/L0/run_optimizers/test_fused_optimizer.py with @skipifRocm to skip test_bfloat16 in Adam.
      
      * Updating chunk_size to 256*32 (8K) which was previously 2048*32 (64K).
      In addition updating depth_to_max_blocks to 2560 (8x compared to previous 320).
      The performance improvement observed is upto 1.4x for large number of elements, upto 5.2x for moderate number of elements and upto 1.44x for small number of elements.
      This change only affects the optimizers specifically when multi_tensor_apply is emabled using --cuda_ext extension when installing apex.
      The set of performance along with comaprison with Torch is captured here
      https://amdcloud.sharepoint.com/
      
      /r/sites/MLSEPerfTeam/Shared%20Documents/Strategic%20Leadership%20Optimizations%20Team%20(SLOT)/Projects/Grid%20Optimization/Elementwise%20Kernel%20-%20Grid%20Optimization%20-%20Benchmark%20sweep.xlsx?d=wa8bacf65a2904002bf3cad4c57769eff&csf=1&web=1&e=JhLVm8
      See sheet chunk_opt.
      
      * Updating all files related to L2norm since test_fuzz (test_multi_tensor_l2norm.TestMultiTensorL2Norm) failed with previous commits.
      changes in chunk_size seems to have effect on reduction kernels so this commit provides a provision for maintaining unoptimized conditions for L2norm and optimizations for all other kernels associated with all optimzers.
      The change includes introducing  multi_tensor_apply_l2norm that assumes chunk_size of 64K as well as multi_tensor_apply_base.cuh specifically to be used by l2norm kernels.
      
      ---------
      Co-authored-by: default avataraspanday <aspanday@amd.com>
      1578c0c7
    • luise.chen's avatar
      Luise/gbn optimization (#105) · cdc17060
      luise.chen authored
      * GroupBN: Reduced buffering for better hiding calculations in some loops of length OUTER_LOOPS
      
      * GroupBN: Use C_ELEMENTS_PER_CTA=64 for BN and BN_relu kernels for improvement of resnet50
      
      * GroupBN: Use C_ELEMENTS_PER_CTA=64 for BN_add_relu kernels for ~10% E2E improvement of resnet50
      cdc17060
    • aspanday's avatar
      Updating BLOCK_SIZE to 1024 in all optimizers. (#103) · 06053e19
      aspanday authored
      * Updating BLOCK_SIZE to 1024.
      tests/L0/run_optimizers/test_fused_optimizer.py test passes except for bfloat16 for Adam. There seems to be a bug in this test that needs to be resolved.
      For now skipping test_bfloat16 for Adam in the unittest.
      Ran 17 other tests and ALL other tests pass!
      More details on the effects of these changes can be found here -  https://confluence.amd.com/display/MLSE/Apex+Kernel+Optimization
      
      .
      This commit changes BLOCK_SIZE=1024 ONLY FOR different optimizers.
      L2norm kernels (part of LAMB optimizer algorithm) still maintain BLOCK_SIZE=512 otherwise Allclose fails.
      
      * Updating tests/L0/run_optimizers/test_fused_optimizer.py with @skipifRocm to skip test_bfloat16 in Adam.
      Co-authored-by: default avataraspanday <aspanday@amd.com>
      06053e19
    • Pruthvi Madugundu's avatar
      Update register keyword handling for C++17 (#100) · f34cade5
      Pruthvi Madugundu authored
      * Update register keyword handling for C++17
      
      The keyword 'register' for storage class is removed in C++17,
      so keeping it active for only c++14 and lower.
      
      * Updates to the code
      f34cade5
    • hubertlu-tw's avatar
      722e1c3f
    • hubertlu-tw's avatar
      Fix a bug in fused_dense_cuda on ROCm · 5c373f70
      hubertlu-tw authored
      5c373f70
    • Hubert Lu's avatar
      Unskip some unit tests related to issue #82 (#98) · 2951440a
      Hubert Lu authored
      * Unskip some unit tests related to issue #82
      
      * Ensure test_state_dict to use capturable=True for torch.optim.Adam
      
      * Fix TestFusedAdam tests in test_fused_optimizer.py
      2951440a
    • Hubert Lu's avatar
      Consider both contiguous and channels_last tensors for FusedSGD (#97) · 9a13347c
      Hubert Lu authored
      * Consider both contiguous and channel_last tensors for FusedSGD
      
      * Consider all the memory formats in fused_sgd
      
      * Add an unit test script for nhwc fused_sgd
      9a13347c
  7. 30 Mar, 2023 1 commit
  8. 23 Mar, 2023 1 commit
    • luise.chen's avatar
      Add FusedLARS optimizer (#109) · 7a428776
      luise.chen authored
      * Add fused_lars optimizer
      
      * Update primitive fused_lars optimizer, working for resnet50 with NHWC/NCHW
      
      * Add flow of using nesterov in FusedLARS
      7a428776
  9. 01 Mar, 2023 1 commit
  10. 15 Feb, 2023 1 commit
    • aspanday's avatar
      Grid optimization - Chunk_Size optimization. (#104) · b047a1f1
      aspanday authored
      * Updating BLOCK_SIZE to 1024.
      tests/L0/run_optimizers/test_fused_optimizer.py test passes except for bfloat16 for Adam. There seems to be a bug in this test that needs to be resolved.
      For now skipping test_bfloat16 for Adam in the unittest.
      Ran 17 other tests and ALL other tests pass!
      More details on the effects of these changes can be found here -  https://confluence.amd.com/display/MLSE/Apex+Kernel+Optimization.
      This commit changes BLOCK_SIZE=1024 ONLY FOR different optimizers.
      L2norm kernels (part of LAMB optimizer algorithm) still maintain BLOCK_SIZE=512 otherwise Allclose fails.
      
      * Updating tests/L0/run_optimizers/test_fused_optimizer.py with @skipifRocm to skip test_bfloat16 in Adam.
      
      * Updating chunk_size to 256*32 (8K) which was previously 2048*32 (64K).
      In addition updating depth_to_max_blocks to 2560 (8x compared to previous 320).
      The performance improvement observed is upto 1.4x for large number of elements, upto 5.2x for moderate number of elements and upto 1.44x for small number of elements.
      This change only affects the optimizers specifically when multi_tensor_apply is emabled using --cuda_ext extension when installing apex.
      The set of performance along with comaprison with Torch is captured here
      https://amdcloud.sharepoint.com/
      
      /r/sites/MLSEPerfTeam/Shared%20Documents/Strategic%20Leadership%20Optimizations%20Team%20(SLOT)/Projects/Grid%20Optimization/Elementwise%20Kernel%20-%20Grid%20Optimization%20-%20Benchmark%20sweep.xlsx?d=wa8bacf65a2904002bf3cad4c57769eff&csf=1&web=1&e=JhLVm8
      See sheet chunk_opt.
      
      * Updating all files related to L2norm since test_fuzz (test_multi_tensor_l2norm.TestMultiTensorL2Norm) failed with previous commits.
      changes in chunk_size seems to have effect on reduction kernels so this commit provides a provision for maintaining unoptimized conditions for L2norm and optimizations for all other kernels associated with all optimzers.
      The change includes introducing  multi_tensor_apply_l2norm that assumes chunk_size of 64K as well as multi_tensor_apply_base.cuh specifically to be used by l2norm kernels.
      
      ---------
      Co-authored-by: default avataraspanday <aspanday@amd.com>
      b047a1f1
  11. 13 Feb, 2023 1 commit
    • luise.chen's avatar
      Luise/gbn optimization (#105) · 56c283b6
      luise.chen authored
      * GroupBN: Reduced buffering for better hiding calculations in some loops of length OUTER_LOOPS
      
      * GroupBN: Use C_ELEMENTS_PER_CTA=64 for BN and BN_relu kernels for improvement of resnet50
      
      * GroupBN: Use C_ELEMENTS_PER_CTA=64 for BN_add_relu kernels for ~10% E2E improvement of resnet50
      56c283b6
  12. 25 Jan, 2023 1 commit
    • aspanday's avatar
      Updating BLOCK_SIZE to 1024 in all optimizers. (#103) · 14db5c27
      aspanday authored
      * Updating BLOCK_SIZE to 1024.
      tests/L0/run_optimizers/test_fused_optimizer.py test passes except for bfloat16 for Adam. There seems to be a bug in this test that needs to be resolved.
      For now skipping test_bfloat16 for Adam in the unittest.
      Ran 17 other tests and ALL other tests pass!
      More details on the effects of these changes can be found here -  https://confluence.amd.com/display/MLSE/Apex+Kernel+Optimization
      
      .
      This commit changes BLOCK_SIZE=1024 ONLY FOR different optimizers.
      L2norm kernels (part of LAMB optimizer algorithm) still maintain BLOCK_SIZE=512 otherwise Allclose fails.
      
      * Updating tests/L0/run_optimizers/test_fused_optimizer.py with @skipifRocm to skip test_bfloat16 in Adam.
      Co-authored-by: default avataraspanday <aspanday@amd.com>
      14db5c27
  13. 20 Dec, 2022 1 commit
  14. 10 Dec, 2022 1 commit
  15. 09 Dec, 2022 2 commits
  16. 06 Dec, 2022 2 commits
  17. 14 Nov, 2022 1 commit
  18. 11 Nov, 2022 1 commit
  19. 08 Nov, 2022 2 commits
  20. 21 Sep, 2022 1 commit
  21. 19 Sep, 2022 1 commit
    • Hubert Lu's avatar
      Faster build (#95) · 89f5722c
      Hubert Lu authored
      * Remove redundant import's and enable ninja for MHA extension
      
      * Remove redundant CUDAExtension import's
      89f5722c
  22. 08 Sep, 2022 4 commits
  23. 07 Sep, 2022 2 commits