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
81497a93
Commit
81497a93
authored
Jun 11, 2019
by
Chao Liu
Browse files
reorginze files
parent
88b77181
Changes
59
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
44 additions
and
48 deletions
+44
-48
include/composable_kernel/tensor_operation/threadwise_tensor_slice_copy.hpp
..._kernel/tensor_operation/threadwise_tensor_slice_copy.hpp
+1
-1
include/composable_kernel/utility/Array.hpp
include/composable_kernel/utility/Array.hpp
+2
-2
include/composable_kernel/utility/Sequence.hpp
include/composable_kernel/utility/Sequence.hpp
+2
-2
include/composable_kernel/utility/amd_inline_asm.hpp
include/composable_kernel/utility/amd_inline_asm.hpp
+1
-1
include/composable_kernel/utility/common.hpp
include/composable_kernel/utility/common.hpp
+17
-0
include/composable_kernel/utility/config.hpp.in
include/composable_kernel/utility/config.hpp.in
+0
-0
include/composable_kernel/utility/functional.hpp
include/composable_kernel/utility/functional.hpp
+4
-4
include/composable_kernel/utility/functional2.hpp
include/composable_kernel/utility/functional2.hpp
+2
-2
include/composable_kernel/utility/functional3.hpp
include/composable_kernel/utility/functional3.hpp
+4
-4
include/composable_kernel/utility/integral_constant.hpp
include/composable_kernel/utility/integral_constant.hpp
+0
-0
include/composable_kernel/utility/utility.hpp
include/composable_kernel/utility/utility.hpp
+5
-4
include/composable_kernel/utility/vector_type.hpp
include/composable_kernel/utility/vector_type.hpp
+2
-2
include/conv_common.hpp
include/conv_common.hpp
+1
-1
include/device.hpp
include/device.hpp
+1
-1
include/gridwise_convolution_kernel_wrapper.hpp
include/gridwise_convolution_kernel_wrapper.hpp
+0
-4
include/tensor.hpp
include/tensor.hpp
+0
-0
src/CMakeLists.txt
src/CMakeLists.txt
+1
-2
src/device.cpp
src/device.cpp
+1
-1
src/include/common.hpp
src/include/common.hpp
+0
-17
No files found.
src/
include/threadwise_tensor_slice_copy.hpp
→
include/
composable_kernel/tensor_operation/
threadwise_tensor_slice_copy.hpp
View file @
81497a93
#ifndef CK_THREADWISE_TENSOR_SLICE_COPY_HPP
#define CK_THREADWISE_TENSOR_SLICE_COPY_HPP
#include "ConstantTensorDescriptor.hpp"
#include "
composable_kernel/tensor_description/
ConstantTensorDescriptor.hpp"
namespace
ck
{
...
...
src/
include/Array.hpp
→
include/
composable_kernel/utility/
Array.hpp
View file @
81497a93
#ifndef CK_ARRAY_HPP
#define CK_ARRAY_HPP
#include "Sequence.hpp"
#include "functional2.hpp"
#include "
composable_kernel/utility/
Sequence.hpp"
#include "
composable_kernel/utility/
functional2.hpp"
namespace
ck
{
...
...
src/
include/Sequence.hpp
→
include/
composable_kernel/utility/
Sequence.hpp
View file @
81497a93
#ifndef CK_SEQUENCE_HPP
#define CK_SEQUENCE_HPP
#include "integral_constant.hpp"
#include "functional.hpp"
#include "
composable_kernel/utility/
integral_constant.hpp"
#include "
composable_kernel/utility/
functional.hpp"
namespace
ck
{
...
...
src/
include/amd_inline_asm.hpp
→
include/
composable_kernel/utility/
amd_inline_asm.hpp
View file @
81497a93
#ifndef CK_AMD_INLINE_ASM_HPP
#define CK_AMD_INLINE_ASM_HPP
#include "com
mon
.hpp"
#include "com
posable_kernel/utility/vector_type
.hpp"
#define NO_VM_WAIT 0
#define NO_LGKM_WAIT 0
...
...
include/composable_kernel/utility/common.hpp
0 → 100644
View file @
81497a93
#ifndef CK_COMMON_HPP
#define CK_COMMON_HPP
#include "composable_kernel/utility/utility.hpp"
#include "composable_kernel/utility/vector_type.hpp"
#include "composable_kernel/utility/integral_constant.hpp"
#include "composable_kernel/utility/Sequence.hpp"
#include "composable_kernel/utility/Array.hpp"
#include "composable_kernel/utility/functional.hpp"
#include "composable_kernel/utility/functional2.hpp"
#include "composable_kernel/utility/functional3.hpp"
#if CK_USE_AMD_INLINE_ASM
#include "composable_kernel/utility/amd_inline_asm.hpp"
#endif
#endif
src/
include/config.hpp.in
→
include/
composable_kernel/utility/
config.hpp.in
View file @
81497a93
File moved
src/
include/functional.hpp
→
include/
composable_kernel/utility/
functional.hpp
View file @
81497a93
#ifndef CK_FUNCTIONAL_HPP
#define CK_FUNCTIONAL_HPP
#include "integral_constant.hpp"
#include "Sequence.hpp"
#include "
composable_kernel/utility/
integral_constant.hpp"
#include "
composable_kernel/utility/
Sequence.hpp"
namespace
ck
{
...
...
@@ -38,7 +38,7 @@ struct static_if<true>
__host__
__device__
constexpr
auto
operator
()(
F
f
)
const
{
// This is a trick for compiler:
// Pass forwarder to lambda "f" as "auto" argument, and mak
s
sure "f" will use it,
// Pass forwarder to lambda "f" as "auto" argument, and mak
e
sure "f" will use it,
// this will make "f" a generic lambda, so that "f" won't be compiled until being
// instantiated here
f
(
forwarder
{});
...
...
@@ -67,7 +67,7 @@ struct static_if<false>
__host__
__device__
static
constexpr
auto
Else
(
F
f
)
{
// This is a trick for compiler:
// Pass forwarder to lambda "f" as "auto" argument, and mak
s
sure "f" will use it,
// Pass forwarder to lambda "f" as "auto" argument, and mak
e
sure "f" will use it,
// this will make "f" a generic lambda, so that "f" won't be compiled until being
// instantiated here
f
(
forwarder
{});
...
...
src/
include/functional2.hpp
→
include/
composable_kernel/utility/
functional2.hpp
View file @
81497a93
#ifndef CK_FUNCTIONAL2_HPP
#define CK_FUNCTIONAL2_HPP
#include "functional.hpp"
#include "Sequence.hpp"
#include "
composable_kernel/utility/
functional.hpp"
#include "
composable_kernel/utility/
Sequence.hpp"
namespace
ck
{
...
...
src/
include/functional3.hpp
→
include/
composable_kernel/utility/
functional3.hpp
View file @
81497a93
#ifndef CK_FUNCTIONAL3_HPP
#define CK_FUNCTIONAL3_HPP
#include "functional.hpp"
#include "functional2.hpp"
#include "Sequence.hpp"
#include "Array.hpp"
#include "
composable_kernel/utility/
functional.hpp"
#include "
composable_kernel/utility/
functional2.hpp"
#include "
composable_kernel/utility/
Sequence.hpp"
#include "
composable_kernel/utility/
Array.hpp"
namespace
ck
{
...
...
src/
include/integral_constant.hpp
→
include/
composable_kernel/utility/
integral_constant.hpp
View file @
81497a93
File moved
src/
include/utility.hpp
→
include/
composable_kernel/utility/
utility.hpp
View file @
81497a93
#ifndef CK_
BASE
_HPP
#define CK_
BASE
_HPP
#ifndef CK_
UTILITY
_HPP
#define CK_
UTILITY
_HPP
namespace
ck
{
...
...
@@ -25,7 +25,8 @@ __host__ __device__ constexpr bool is_same_type(X, Y)
return
is_same
<
X
,
Y
>::
value
;
}
namespace
math
{
// namespace math
namespace
math
{
template
<
class
T
,
T
s
>
struct
scales
{
...
...
@@ -106,7 +107,7 @@ __host__ __device__ constexpr T min(T x, Ts... xs)
}
// this is wrong
// TODO: implement
correct
least common multiple, instead of calling max()
// TODO: implement least common multiple
properly
, instead of calling max()
template
<
class
T
,
class
...
Ts
>
__host__
__device__
constexpr
T
lcm
(
T
x
,
Ts
...
xs
)
{
...
...
src/
include/vector_type.hpp
→
include/
composable_kernel/utility/
vector_type.hpp
View file @
81497a93
#ifndef CK_VECTOR_TYPE_HPP
#define CK_VECTOR_TYPE_HPP
#include "config.hpp"
#include "integral_constant.hpp"
#include "
composable_kernel/utility/
config.hpp"
#include "
composable_kernel/utility/
integral_constant.hpp"
namespace
ck
{
...
...
src/
include/conv_common.hpp
→
include/conv_common.hpp
View file @
81497a93
#ifndef CK_CONV_COMMON_HPP
#define CK_CONV_COMMON_HPP
#include "ConstantTensorDescriptor.hpp"
#include "
composable_kernel/tensor_description/
ConstantTensorDescriptor.hpp"
using
namespace
ck
;
...
...
src/
include/device.hpp
→
include/device.hpp
View file @
81497a93
...
...
@@ -2,7 +2,7 @@
#define CK_DEVICE_HPP
#include <memory>
#include "config.hpp"
#include "
composable_kernel/utility/
config.hpp"
using
namespace
ck
;
...
...
src/
include/gridwise_convolution_kernel_wrapper.hpp
→
include/gridwise_convolution_kernel_wrapper.hpp
View file @
81497a93
#ifndef CK_GRIDWISE_CONVOLUTION_KERNEL_WRAPPER
#define CK_GRIDWISE_CONVOLUTION_KERNEL_WRAPPER
namespace
ck
{
template
<
class
GridwiseConvolution
,
class
T
>
__global__
void
run_gridwise_convolution_kernel
(
const
T
*
const
__restrict__
p_in_global
,
const
T
*
const
__restrict__
p_wei_global
,
...
...
@@ -11,6 +9,4 @@ __global__ void run_gridwise_convolution_kernel(const T* const __restrict__ p_in
GridwiseConvolution
{}.
Run
(
p_in_global
,
p_wei_global
,
p_out_global
);
}
}
// namespace ck
#endif
src/
include/tensor.hpp
→
include/tensor.hpp
View file @
81497a93
File moved
src/CMakeLists.txt
View file @
81497a93
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/
src/
include/config.hpp.in"
"
${
PROJECT_BINARY_DIR
}
/
src/
include/config.hpp"
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/include/
composable_kernel/utility/
config.hpp.in"
"
${
PROJECT_BINARY_DIR
}
/include/
composable_kernel/utility/
config.hpp"
)
set
(
TENSOR_SOURCE
tensor.cpp;
...
...
@@ -9,7 +9,6 @@ add_library(tensor SHARED ${TENSOR_SOURCE})
target_compile_features
(
tensor PUBLIC
)
set_target_properties
(
tensor PROPERTIES POSITION_INDEPENDENT_CODE ON
)
if
(
DEVICE_BACKEND STREQUAL
"CUDA"
)
target_link_libraries
(
tensor nvToolsExt cudart
)
endif
()
...
...
src/device.cpp
View file @
81497a93
#include "config.hpp"
#include "
composable_kernel/utility/
config.hpp"
#include "device.hpp"
DeviceMem
::
DeviceMem
(
std
::
size_t
mem_size
)
:
mMemSize
(
mem_size
)
...
...
src/include/common.hpp
deleted
100644 → 0
View file @
88b77181
#ifndef CK_COMMON_HPP
#define CK_COMMON_HPP
#include "utility.hpp"
#include "vector_type.hpp"
#include "integral_constant.hpp"
#include "Sequence.hpp"
#include "Array.hpp"
#include "functional.hpp"
#include "functional2.hpp"
#include "functional3.hpp"
#if CK_USE_AMD_INLINE_ASM
#include "amd_inline_asm.hpp"
#endif
#endif
Prev
1
2
3
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