Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel
Commits
cba8f7f2
Commit
cba8f7f2
authored
Jun 26, 2022
by
Anthony Chang
Browse files
Merge remote-tracking branch 'upstream/develop' into gemm-layernorm-4
parents
cc50b687
b653c5eb
Changes
583
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
105 additions
and
99 deletions
+105
-99
include/ck/utility/dynamic_buffer.hpp
include/ck/utility/dynamic_buffer.hpp
+5
-1
include/ck/utility/enable_if.hpp
include/ck/utility/enable_if.hpp
+3
-0
include/ck/utility/functional.hpp
include/ck/utility/functional.hpp
+3
-0
include/ck/utility/functional2.hpp
include/ck/utility/functional2.hpp
+6
-5
include/ck/utility/functional3.hpp
include/ck/utility/functional3.hpp
+9
-7
include/ck/utility/functional4.hpp
include/ck/utility/functional4.hpp
+3
-0
include/ck/utility/generic_memory_space_atomic.hpp
include/ck/utility/generic_memory_space_atomic.hpp
+3
-0
include/ck/utility/get_id.hpp
include/ck/utility/get_id.hpp
+5
-1
include/ck/utility/ignore.hpp
include/ck/utility/ignore.hpp
+3
-0
include/ck/utility/inner_product.hpp
include/ck/utility/inner_product.hpp
+3
-0
include/ck/utility/integral_constant.hpp
include/ck/utility/integral_constant.hpp
+3
-0
include/ck/utility/is_known_at_compile_time.hpp
include/ck/utility/is_known_at_compile_time.hpp
+5
-4
include/ck/utility/magic_division.hpp
include/ck/utility/magic_division.hpp
+5
-5
include/ck/utility/math.hpp
include/ck/utility/math.hpp
+21
-5
include/ck/utility/math_v2.hpp
include/ck/utility/math_v2.hpp
+7
-6
include/ck/utility/multi_index.hpp
include/ck/utility/multi_index.hpp
+4
-4
include/ck/utility/number.hpp
include/ck/utility/number.hpp
+3
-0
include/ck/utility/print.hpp
include/ck/utility/print.hpp
+3
-0
include/ck/utility/reduction_common.hpp
include/ck/utility/reduction_common.hpp
+6
-31
include/ck/utility/reduction_enums.hpp
include/ck/utility/reduction_enums.hpp
+5
-30
No files found.
include/ck/utility/dynamic_buffer.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "config.hpp"
#include "ck/ck.hpp"
#include "enable_if.hpp"
#include "c_style_pointer_cast.hpp"
#include "amd_buffer_addressing.hpp"
...
...
include/ck/utility/enable_if.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
namespace
ck
{
...
...
include/ck/utility/functional.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#ifndef CK_FUNCTIONAL_HPP
#define CK_FUNCTIONAL_HPP
...
...
include/ck/utility/functional2.hpp
View file @
cba8f7f2
#ifndef CK_FUNCTIONAL2_HPP
#define CK_FUNCTIONAL2_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "functional.hpp"
#include "sequence.hpp"
#pragma once
#include "ck/utility/functional.hpp"
#include "ck/utility/sequence.hpp"
namespace
ck
{
...
...
@@ -45,4 +47,3 @@ struct static_for
};
}
// namespace ck
#endif
include/ck/utility/functional3.hpp
View file @
cba8f7f2
#ifndef CK_FUNCTIONAL3_HPP
#define CK_FUNCTIONAL3_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "functional.hpp"
#include "functional2.hpp"
#include "sequence.hpp"
#include "multi_index.hpp"
#pragma once
#include "ck/ck.hpp"
#include "ck/utility/functional.hpp"
#include "ck/utility/functional2.hpp"
#include "ck/utility/sequence.hpp"
#include "ck/utility/multi_index.hpp"
namespace
ck
{
...
...
@@ -139,4 +142,3 @@ struct ford
};
}
// namespace ck
#endif
include/ck/utility/functional4.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#ifndef CK_FUNCTIONAL4_HPP
#define CK_FUNCTIONAL4_HPP
...
...
include/ck/utility/generic_memory_space_atomic.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "data_type.hpp"
...
...
include/ck/utility/get_id.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "config.hpp"
#include "ck/ck.hpp"
namespace
ck
{
...
...
include/ck/utility/ignore.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#ifndef CK_IGNORE_HPP
#define CK_IGNORE_HPP
...
...
include/ck/utility/inner_product.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "data_type.hpp"
...
...
include/ck/utility/integral_constant.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#ifndef CK_INTEGRAL_CONSTANT_HPP
#define CK_INTEGRAL_CONSTANT_HPP
...
...
include/ck/utility/is_known_at_compile_time.hpp
View file @
cba8f7f2
#ifndef IS_KNOWN_AT_COMPILE_TIME_HPP
#define IS_KNOWN_AT_COMPILE_TIME_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "config.hpp"
#pragma once
#include "ck/ck.hpp"
#include "integral_constant.hpp"
#include "sequence.hpp"
#include "tuple.hpp"
...
...
@@ -52,4 +54,3 @@ struct is_known_at_compile_time<Tuple<Ts...>>
};
}
// namespace ck
#endif
include/ck/utility/magic_division.hpp
View file @
cba8f7f2
#ifndef CK_MAGIC_DIVISION_HPP
#define CK_MAGIC_DIVISION_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "config.hpp"
#pragma once
#include "ck/ck.hpp"
#include "integral_constant.hpp"
#include "number.hpp"
#include "type.hpp"
...
...
@@ -156,5 +158,3 @@ struct MagicDivision
};
}
// namespace ck
#endif
include/ck/utility/math.hpp
View file @
cba8f7f2
#ifndef CK_MATH_HPP
#define CK_MATH_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "config.hpp"
#pragma once
#include "ck/ck.hpp"
#include "integral_constant.hpp"
#include "number.hpp"
#include "type.hpp"
...
...
@@ -142,6 +144,22 @@ __host__ __device__ constexpr auto min(X x, Ys... ys)
return
min
(
x
,
min
(
ys
...));
}
// disallow implicit type casting
template
<
typename
T
>
__device__
T
exp
(
T
x
);
template
<
>
__device__
float
exp
<
float
>
(
float
x
)
{
return
__expf
(
x
);
}
template
<
>
__device__
double
exp
<
double
>
(
double
x
)
{
return
exp
(
x
);
}
// greatest common divisor, aka highest common factor
__host__
__device__
constexpr
index_t
gcd
(
index_t
x
,
index_t
y
)
{
...
...
@@ -212,5 +230,3 @@ struct less
}
// namespace math
}
// namespace ck
#endif
include/ck/utility/math_v2.hpp
View file @
cba8f7f2
#ifndef CK_MATH_V2_HPP
#define CK_MATH_V2_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include <cmath>
#include "data_type.hpp"
#include "type.hpp"
#include "ck/utility/data_type.hpp"
#include "ck/utility/type.hpp"
namespace
ck
{
namespace
math
{
...
...
@@ -112,5 +115,3 @@ static inline __device__ double sqrt(double x) { return ::sqrt(x); };
}
// namespace math
}
// namespace ck
#endif
include/ck/utility/multi_index.hpp
View file @
cba8f7f2
#ifndef CK_MULTI_INDEX_HPP
#define CK_MULTI_INDEX_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "common_header.hpp"
...
...
@@ -8,5 +10,3 @@
#else
#include "statically_indexed_array_multi_index.hpp"
#endif
#endif
include/ck/utility/number.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#ifndef CK_NUMBER_HPP
#define CK_NUMBER_HPP
...
...
include/ck/utility/print.hpp
View file @
cba8f7f2
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#ifndef CK_PRINT_HPP
#define CK_PRINT_HPP
...
...
include/ck/utility/reduction_common.hpp
View file @
cba8f7f2
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2020 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#ifndef CK_REDUCTION_COMMON_HPP
#define CK_REDUCTION_COMMON_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "reduction_enums.hpp"
#pragma once
#include "ck/utility/reduction_enums.hpp"
namespace
ck
{
...
...
@@ -60,6 +37,4 @@ constexpr __device__ index_t get_shift<1>()
return
(
0
);
}
};
// end of namespace ck
#endif
}
// namespace ck
include/ck/utility/reduction_enums.hpp
View file @
cba8f7f2
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2020 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#ifndef CK_REDUCTION_ENUMS_HPP
#define CK_REDUCTION_ENUMS_HPP
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
namespace
ck
{
...
...
@@ -61,6 +38,4 @@ enum struct IndicesType
INDICES_8BIT
=
3
,
};
};
// end of namespace ck
#endif
}
// namespace ck
Prev
1
…
7
8
9
10
11
12
13
14
15
…
30
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment