Commit 81497a93 authored by Chao Liu's avatar Chao Liu
Browse files

reorginze files

parent 88b77181
#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 {
......
#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 {
......
#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 {
......
#ifndef CK_AMD_INLINE_ASM_HPP
#define CK_AMD_INLINE_ASM_HPP
#include "common.hpp"
#include "composable_kernel/utility/vector_type.hpp"
#define NO_VM_WAIT 0
#define NO_LGKM_WAIT 0
......
#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
#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 maks sure "f" will use it,
// Pass forwarder to lambda "f" as "auto" argument, and make 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 maks sure "f" will use it,
// Pass forwarder to lambda "f" as "auto" argument, and make 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{});
......
#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 {
......
#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 {
......
#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)
{
......
#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 {
......
#ifndef CK_CONV_COMMON_HPP
#define CK_CONV_COMMON_HPP
#include "ConstantTensorDescriptor.hpp"
#include "composable_kernel/tensor_description/ConstantTensorDescriptor.hpp"
using namespace ck;
......
......@@ -2,7 +2,7 @@
#define CK_DEVICE_HPP
#include <memory>
#include "config.hpp"
#include "composable_kernel/utility/config.hpp"
using namespace ck;
......
#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
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()
......
#include "config.hpp"
#include "composable_kernel/utility/config.hpp"
#include "device.hpp"
DeviceMem::DeviceMem(std::size_t mem_size) : mMemSize(mem_size)
......
#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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment