Browse Source

refactor(dnn/rocm): update hip license header

GitOrigin-RevId: 79d684755d
release-1.6
Megvii Engine Team 4 years ago
parent
commit
103d7f33ba
51 changed files with 322 additions and 231 deletions
  1. +7
    -4
      dnn/src/rocm/add_update/add_update.cpp.hip
  2. +7
    -4
      dnn/src/rocm/add_update/add_update.h.hip
  3. +7
    -4
      dnn/src/rocm/argmxx/argmxx.cpp.hip
  4. +2
    -2
      dnn/src/rocm/argsort/opr_impl.cpp
  5. +7
    -4
      dnn/src/rocm/checksum/kern.cpp.hip
  6. +7
    -4
      dnn/src/rocm/checksum/kern.h.hip
  7. +7
    -4
      dnn/src/rocm/convolution/chanwise/bwd_data.cpp.hip
  8. +7
    -4
      dnn/src/rocm/convolution/chanwise/bwd_filter.cpp.hip
  9. +7
    -4
      dnn/src/rocm/convolution/chanwise/fwd.cpp.hip
  10. +7
    -4
      dnn/src/rocm/convolution/chanwise/kern.h.hip
  11. +7
    -4
      dnn/src/rocm/convolution/chanwise/kern_helper.h.hip
  12. +7
    -4
      dnn/src/rocm/convolution/forward/inplace_matmul_impl.cpp.hip
  13. +7
    -4
      dnn/src/rocm/convolution/forward/inplace_matmul_impl.h.hip
  14. +7
    -4
      dnn/src/rocm/convolution/im2col.cpp.hip
  15. +7
    -4
      dnn/src/rocm/convolution/im2col.h.hip
  16. +6
    -5
      dnn/src/rocm/elemwise/kern_wrapper.h.hip
  17. +1
    -1
      dnn/src/rocm/elemwise/special_kerns.h.hip
  18. +6
    -4
      dnn/src/rocm/elemwise_helper.h.hip
  19. +7
    -4
      dnn/src/rocm/error_info.h.hip
  20. +7
    -4
      dnn/src/rocm/eye/eye.cpp.hip
  21. +7
    -4
      dnn/src/rocm/eye/eye.h.hip
  22. +7
    -4
      dnn/src/rocm/indexing_multi_axis_vec/kern.h.hip
  23. +7
    -4
      dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_fwd.cpp.hip
  24. +7
    -4
      dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_impl.hipinl
  25. +7
    -4
      dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_incr.cpp.hip
  26. +7
    -4
      dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_set.cpp.hip
  27. +7
    -4
      dnn/src/rocm/indexing_multi_axis_vec/kern_gen_offset_base.cpp.hip
  28. +7
    -4
      dnn/src/rocm/indexing_one_hot/indexing_one_hot.cpp.hip
  29. +7
    -4
      dnn/src/rocm/indexing_one_hot/indexing_one_hot.h.hip
  30. +6
    -5
      dnn/src/rocm/int_fastdiv.h.hip
  31. +7
    -4
      dnn/src/rocm/linspace/linspace.cpp.hip
  32. +7
    -4
      dnn/src/rocm/linspace/linspace.h.hip
  33. +7
    -4
      dnn/src/rocm/powc/powc.cpp.hip
  34. +7
    -4
      dnn/src/rocm/powc/powc.h.hip
  35. +7
    -4
      dnn/src/rocm/reduce/reduce.cpp.hip
  36. +7
    -5
      dnn/src/rocm/reduce_helper.h.hip
  37. +7
    -5
      dnn/src/rocm/reduce_helper.hipinl
  38. +6
    -5
      dnn/src/rocm/reduce_helper/column.hipinl
  39. +6
    -5
      dnn/src/rocm/reduce_helper/largeBC.hipinl
  40. +7
    -4
      dnn/src/rocm/relayout/relayout.cpp.hip
  41. +7
    -4
      dnn/src/rocm/relayout/relayout.h.hip
  42. +7
    -4
      dnn/src/rocm/relayout/relayout_contiguous.cpp.hip
  43. +7
    -4
      dnn/src/rocm/relayout/relayout_contiguous.h.hip
  44. +7
    -4
      dnn/src/rocm/sleep/kern.cpp.hip
  45. +7
    -4
      dnn/src/rocm/sleep/kern.h.hip
  46. +2
    -10
      dnn/src/rocm/topk/opr_impl.cpp
  47. +0
    -23
      dnn/src/rocm/topk/topk_radix.h.hip
  48. +7
    -4
      dnn/src/rocm/type_cvt/type_cvt.cpp.hip
  49. +7
    -4
      dnn/src/rocm/type_cvt/type_cvt.h.hip
  50. +7
    -4
      dnn/src/rocm/utils.h.hip
  51. +0
    -5
      dnn/test/rocm/topk.cpp

+ 7
- 4
dnn/src/rocm/add_update/add_update.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/add_update/add_update.cpp.hip
* \file dnn/src/rocm/add_update/add_update.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "./add_update.h.hip"


+ 7
- 4
dnn/src/rocm/add_update/add_update.h.hip View File

@@ -1,11 +1,14 @@
/**
*
* \file src/rocm/add_update/add_update.h.hip
* \file dnn/src/rocm/add_update/add_update.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/argmxx/argmxx.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/argmxx/argmxx.cpp.hip
* \file dnn/src/rocm/argmxx/argmxx.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "hip_header.h"


+ 2
- 2
dnn/src/rocm/argsort/opr_impl.cpp View File

@@ -37,7 +37,7 @@ void ArgsortForwardImpl::exec(_megdnn_tensor_in src, _megdnn_tensor_out dst,
ARGSORT_FOREACH_CTYPE(cb);
#undef cb
default:
megdnn_throw(ssprintf("unsupported argsort dtype on cuda: %s",
megdnn_throw(ssprintf("unsupported argsort dtype on rocm: %s",
src.layout.dtype.name()));
}
}
@@ -71,7 +71,7 @@ void ArgsortBackwardImpl::exec(_megdnn_tensor_in diff,
ARGSORT_FOREACH_CTYPE(cb);
#undef cb
default:
megdnn_throw(ssprintf("unsupported argsort dtype on cuda: %s",
megdnn_throw(ssprintf("unsupported argsort dtype on rocm: %s",
diff.layout.dtype.name()));
}
}


+ 7
- 4
dnn/src/rocm/checksum/kern.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/checksum/kern.cpp.hip
* \file dnn/src/rocm/checksum/kern.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/checksum/kern.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/checksum/kern.h.hip
* \file dnn/src/rocm/checksum/kern.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/convolution/chanwise/bwd_data.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/chanwise/bwd_data.cpp.hip
* \file dnn/src/rocm/convolution/chanwise/bwd_data.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/convolution/chanwise/bwd_filter.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/chanwise/bwd_filter.cpp.hip
* \file dnn/src/rocm/convolution/chanwise/bwd_filter.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/convolution/chanwise/fwd.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/chanwise/fwd.cpp.hip
* \file dnn/src/rocm/convolution/chanwise/fwd.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/convolution/chanwise/kern.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/chanwise/kern.h.hip
* \file dnn/src/rocm/convolution/chanwise/kern.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 7
- 4
dnn/src/rocm/convolution/chanwise/kern_helper.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/chanwise/kern_helper.h.hip
* \file dnn/src/rocm/convolution/chanwise/kern_helper.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 7
- 4
dnn/src/rocm/convolution/forward/inplace_matmul_impl.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/forward/inplace_matmul_impl.cpp.hip
* \file dnn/src/rocm/convolution/forward/inplace_matmul_impl.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "./inplace_matmul_impl.h.hip"
#include "src/rocm/utils.h.hip"


+ 7
- 4
dnn/src/rocm/convolution/forward/inplace_matmul_impl.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/forward/inplace_matmul_impl.h.hip
* \file dnn/src/rocm/convolution/forward/inplace_matmul_impl.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 7
- 4
dnn/src/rocm/convolution/im2col.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/im2col.cpp.hip
* \file dnn/src/rocm/convolution/im2col.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "./im2col.h.hip"
#include "megdnn/dtype.h"


+ 7
- 4
dnn/src/rocm/convolution/im2col.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/convolution/im2col.h.hip
* \file dnn/src/rocm/convolution/im2col.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 6
- 5
dnn/src/rocm/elemwise/kern_wrapper.h.hip View File

@@ -1,12 +1,13 @@
/**
* \file src/rocm/elemwise/kern_wrapper.h.hip
* \file dnn/src/rocm/elemwise/kern_wrapper.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief helper for implementing elemwise oprs
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 1
- 1
dnn/src/rocm/elemwise/special_kerns.h.hip View File

@@ -1,5 +1,5 @@
/**
* \file src/rocm/elemwise/special_kerns.h.hip
* \file dnn/src/rocm/elemwise/special_kerns.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.


+ 6
- 4
dnn/src/rocm/elemwise_helper.h.hip View File

@@ -1,11 +1,13 @@
/**
* \file src/rocm/elemwise_helper.h.hip
* \file dnn/src/rocm/elemwise_helper.h.hip
*
* This file is part of MegBrain, a deep learning framework developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief helper utilities for implementing element-wise kernels
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/error_info.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/error_info.h.hip
* \file dnn/src/rocm/error_info.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/eye/eye.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/eye/eye.cpp.hip
* \file dnn/src/rocm/eye/eye.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/eye/eye.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/eye/eye.h.hip
* \file dnn/src/rocm/eye/eye.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once
#include <stdint.h>


+ 7
- 4
dnn/src/rocm/indexing_multi_axis_vec/kern.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_multi_axis_vec/kern.h.hip
* \file dnn/src/rocm/indexing_multi_axis_vec/kern.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_fwd.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_multi_axis_vec/kern_apply_opr_fwd.cpp.hip
* \file dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_fwd.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"



+ 7
- 4
dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_impl.hipinl View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_multi_axis_vec/kern_apply_opr_impl.hipinl
* \file dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_impl.hipinl
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#ifndef KERN_APPLY_OPR_OPR


+ 7
- 4
dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_incr.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_multi_axis_vec/kern_apply_opr_incr.cpp.hip
* \file dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_incr.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"



+ 7
- 4
dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_set.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_multi_axis_vec/kern_apply_opr_set.cpp.hip
* \file dnn/src/rocm/indexing_multi_axis_vec/kern_apply_opr_set.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"



+ 7
- 4
dnn/src/rocm/indexing_multi_axis_vec/kern_gen_offset_base.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_multi_axis_vec/kern_gen_offset_base.hip.cpp
* \file dnn/src/rocm/indexing_multi_axis_vec/kern_gen_offset_base.hip.cpp
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"



+ 7
- 4
dnn/src/rocm/indexing_one_hot/indexing_one_hot.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_one_hot/indexing_one_hot.cpp.hip
* \file dnn/src/rocm/indexing_one_hot/indexing_one_hot.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2016 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "./indexing_one_hot.h.hip"


+ 7
- 4
dnn/src/rocm/indexing_one_hot/indexing_one_hot.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/indexing_one_hot/indexing_one_hot.h.hip
* \file dnn/src/rocm/indexing_one_hot/indexing_one_hot.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 6
- 5
dnn/src/rocm/int_fastdiv.h.hip View File

@@ -1,12 +1,13 @@
/**
* \file src/rocm/int_fastdiv.h.hip
* \file dnn/src/rocm/int_fastdiv.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief fast integer division for constant divisor
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/linspace/linspace.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/linspace/linspace.cpp.hip
* \file dnn/src/rocm/linspace/linspace.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "./linspace.h.hip"


+ 7
- 4
dnn/src/rocm/linspace/linspace.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/linspace/linspace.h.hip
* \file dnn/src/rocm/linspace/linspace.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hip_header.h"



+ 7
- 4
dnn/src/rocm/powc/powc.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/powc/powc.cpp.hip
* \file dnn/src/rocm/powc/powc.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "src/rocm/powc/powc.h.hip"


+ 7
- 4
dnn/src/rocm/powc/powc.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/powc/powc.h.hip
* \file dnn/src/rocm/powc/powc.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/reduce/reduce.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/reduce/reduce.cpp.hip
* \file dnn/src/rocm/reduce/reduce.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "hip_header.h"


+ 7
- 5
dnn/src/rocm/reduce_helper.h.hip View File

@@ -1,11 +1,13 @@
/**
* \file src/rocm/reduce_helper.h.hip
* \file dnn/src/rocm/reduce_helper.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief helper for implementing reduce operators
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 7
- 5
dnn/src/rocm/reduce_helper.hipinl View File

@@ -1,12 +1,14 @@
/**
* \file src/rocm/reduce_helper.hipinl
* \file dnn/src/rocm/reduce_helper.hipinl
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief helper for implementing reduce operators
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

*/

#pragma once


+ 6
- 5
dnn/src/rocm/reduce_helper/column.hipinl View File

@@ -1,12 +1,13 @@
/**
* \file src/rocm/reduce_helper/column.hipinl
* \file dnn/src/rocm/reduce_helper/column.hipinl
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief reduce kernel for (A, B) -> (A, 1) with small B
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 6
- 5
dnn/src/rocm/reduce_helper/largeBC.hipinl View File

@@ -1,12 +1,13 @@
/**
* \file src/rocm/reduce_helper/largeBC.hipinl
* \file dnn/src/rocm/reduce_helper/largeBC.hipinl
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \brief reduce kernel for large (B * C) value
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/relayout/relayout.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/relayout/relayout.cpp.hip
* \file dnn/src/rocm/relayout/relayout.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "./relayout.h.hip"


+ 7
- 4
dnn/src/rocm/relayout/relayout.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/relayout/relayout.h.hip
* \file dnn/src/rocm/relayout/relayout.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/relayout/relayout_contiguous.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/relayout/kern_contiguous.cpp.hip
* \file dnn/src/rocm/relayout/kern_contiguous.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"



+ 7
- 4
dnn/src/rocm/relayout/relayout_contiguous.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/relayout/relayout_contiguous.h.hip
* \file dnn/src/rocm/relayout/relayout_contiguous.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#pragma once


+ 7
- 4
dnn/src/rocm/sleep/kern.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/sleep/kern.cpp.hip
* \file dnn/src/rocm/sleep/kern.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/sleep/kern.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/sleep/kern.h.hip
* \file dnn/src/rocm/sleep/kern.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 2
- 10
dnn/src/rocm/topk/opr_impl.cpp View File

@@ -81,18 +81,10 @@ void TopKImpl::do_exec(int k, _megdnn_tensor_in data, _megdnn_tensor_out values,
values.ptr<int32_t>(), indices,
workspace.raw_ptr);
return;
// #if !MEGDNN_DISABLE_FLOAT16
// case DTypeEnum::Float16:
// dispatch_with_ctype<dt_float16>(k, data.layout[0], data.layout[1],
// data.layout.stride[0], data.ptr<dt_float16>(),
// values.ptr<dt_float16>(), indices,
// workspace.raw_ptr);
// return;
// #endif
default:
megdnn_throw(
ssprintf("only float32, int32 and float16 supported for "
"cuda topk, got: %s",
ssprintf("only float32, int32 are supported for "
"rocm topk, got: %s",
data.layout.dtype.name()));
}
}


+ 0
- 23
dnn/src/rocm/topk/topk_radix.h.hip View File

@@ -59,29 +59,6 @@ struct RadixConverter<int32_t> {
}
};

// #if !MEGDNN_DISABLE_FLOAT16
// template <>
// struct RadixConverter<dt_float16> {
// union FIunion {
// FIunion() {}
// dt_float16 fv;
// uint16_t iv;
// };
// static __forceinline__ __device__ __host__ uint16_t to_radix(dt_float16 val) {
// FIunion fi;
// fi.fv = val;
// return fi.iv ^ (((!(fi.iv >> 15u)) - 1u) | 0x8000u);
// }
// static __forceinline__ __device__ __host__ dt_float16 from_radix(uint16_t val) {
// FIunion fi;
// // do not write as to_radix() to work around a compiler bug in cuda-9.0
// uint16_t m = 0x8000u;
// fi.iv = val ^ (m | (m - !(val >> 15u)));
// return fi.fv;
// }
// };
// #endif

} // namespace internal

/*!


+ 7
- 4
dnn/src/rocm/type_cvt/type_cvt.cpp.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/type_cvt/type_cvt.cpp.hip
* \file dnn/src/rocm/type_cvt/type_cvt.cpp.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#include "hcc_detail/hcc_defs_prologue.h"
#include "./type_cvt.h.hip"


+ 7
- 4
dnn/src/rocm/type_cvt/type_cvt.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/type_cvt/type_cvt.h.hip
* \file dnn/src/rocm/type_cvt/type_cvt.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

#include "hip_header.h"


+ 7
- 4
dnn/src/rocm/utils.h.hip View File

@@ -1,10 +1,13 @@
/**
* \file src/rocm/utils.h.hip
* \file dnn/src/rocm/utils.h.hip
*
* This file is part of MegDNN, a deep neural network run-time library
* developed by Megvii.
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* \copyright Copyright (c) 2014-2019 Megvii Inc. All rights reserved.
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once



+ 0
- 5
dnn/test/rocm/topk.cpp View File

@@ -29,10 +29,5 @@ TEST_F(ROCM, TOP_K) {
TEST_F(ROCM, TOP_K_I32) {
run_topk_test<dtype::Int32>(handle_rocm());
}
// #if !MEGDNN_DISABLE_FLOAT16
// TEST_F(ROCM, TOP_K_F16) {
// run_topk_test<dtype::Float16>(handle_rocm());
// }
// #endif

// vim: syntax=cpp.doxygen

Loading…
Cancel
Save