Skip to content

Commit 335da67

Browse files
authored
v0.2.1 (#116)
* Fix a header installation bug * Check the Python version during build * Resolve compilation warnings
1 parent 693fe01 commit 335da67

28 files changed

Lines changed: 54 additions & 80 deletions

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cff-version: 1.2.0
22
title: "ARK: A GPU-driven system framework for scalable AI applications"
3-
version: 0.2.0
3+
version: 0.2.1
44
message: >-
55
If you use this project in your research, please cite it as below.
66
authors:

CMakeLists.txt

Lines changed: 15 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set(ARK_MAJOR "0")
55
set(ARK_MINOR "2")
6-
set(ARK_PATCH "0")
6+
set(ARK_PATCH "1")
77

88
set(ARK_VERSION "${ARK_MAJOR}.${ARK_MINOR}.${ARK_PATCH}")
99
set(ARK_SOVERSION "${ARK_MAJOR}.${ARK_MINOR}")
@@ -45,11 +45,11 @@ if(CUDAToolkit_FOUND)
4545
endif()
4646

4747
if(CUDAToolkit_VERSION_MAJOR GREATER_EQUAL 11)
48-
set(CMAKE_CUDA_ARCHITECTURES 70 80)
48+
set(CMAKE_CUDA_ARCHITECTURES 60 70 80)
4949
endif()
5050

5151
if(CUDAToolkit_VERSION_MAJOR GREATER_EQUAL 12)
52-
set(CMAKE_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES} 70 80 90)
52+
set(CMAKE_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES} 90)
5353
endif()
5454
endif()
5555

@@ -100,50 +100,21 @@ add_custom_target(ut)
100100
# Details
101101
add_subdirectory(ark)
102102

103-
# Add header files to library targets
104-
file(GLOB_RECURSE ARK_HEADERS CONFIGURE_DEPENDS
105-
${CMAKE_SOURCE_DIR}/ark/include/*.h)
106-
file(GLOB_RECURSE CUTLASS_HEADERS CONFIGURE_DEPENDS
107-
${CMAKE_SOURCE_DIR}/third_party/cutlass/include/*.h
108-
${CMAKE_SOURCE_DIR}/third_party/cutlass/include/*.hpp
109-
${CMAKE_SOURCE_DIR}/third_party/cutlass/include/*.inl)
110-
target_sources(ark PUBLIC
111-
FILE_SET install_headers
112-
TYPE HEADERS
113-
BASE_DIRS ${CMAKE_SOURCE_DIR}/ark/include
114-
FILES ${ARK_HEADERS}
115-
)
116-
target_sources(ark_static PUBLIC
117-
FILE_SET install_headers
118-
TYPE HEADERS
119-
BASE_DIRS ${CMAKE_SOURCE_DIR}/ark/include
120-
FILES ${ARK_HEADERS}
121-
)
122-
target_sources(ark PUBLIC
123-
FILE_SET install_cutlass_headers
124-
TYPE HEADERS
125-
BASE_DIRS ${CMAKE_SOURCE_DIR}/third_party/cutlass/include
126-
FILES ${CUTLASS_HEADERS}
127-
)
128-
target_sources(ark_static PUBLIC
129-
FILE_SET install_cutlass_headers
130-
TYPE HEADERS
131-
BASE_DIRS ${CMAKE_SOURCE_DIR}/third_party/cutlass/include
132-
FILES ${CUTLASS_HEADERS}
133-
)
134-
135-
# Install libraries
136-
install(TARGETS ark ark_static
137-
LIBRARY DESTINATION ark/lib
138-
ARCHIVE DESTINATION ark/lib
139-
FILE_SET install_headers DESTINATION ark/include
140-
FILE_SET install_cutlass_headers DESTINATION ark/include/kernels
141-
)
142-
143-
# Install Python module
144103
if(BUILD_PYTHON)
104+
# Install Python module
145105
add_subdirectory(python)
106+
add_dependencies(ark_py build)
107+
install(TARGETS ark_py LIBRARY DESTINATION ark)
108+
else()
109+
# Install libraries
110+
install(TARGETS ark ark_static
111+
LIBRARY DESTINATION ark/lib
112+
ARCHIVE DESTINATION ark/lib
113+
)
146114
endif()
147115

116+
# Install header files
117+
install(DIRECTORY ${BUILD_DIR}/include DESTINATION ark)
118+
148119
# Utils
149120
include(${PROJECT_SOURCE_DIR}/cmake/Utils.cmake)

ark/include/ark.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#define ARK_MAJOR 0
1313
#define ARK_MINOR 2
14-
#define ARK_PATCH 0
14+
#define ARK_PATCH 1
1515
#define ARK_VERSION (ARK_MAJOR * 10000 + ARK_MINOR * 100 + ARK_PATCH)
1616

1717
namespace ark {

ark/ops/ops_add.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Tensor *Model::add(Tensor *input, Tensor *other, Tensor *output,
5252
{
5353
CHECK(input != nullptr);
5454
CHECK(other != nullptr);
55-
OpPrecType pt;
55+
OpPrecType pt = OP_PREC_NONE;
5656
if (input->type == FP16) {
5757
pt = OP_PREC_FP16;
5858
} else if (input->type == FP32) {

ark/ops/ops_div.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Tensor *Model::div(Tensor *input, Tensor *other, Tensor *output,
5353
{
5454
assert(input != nullptr);
5555
assert(other != nullptr);
56-
OpPrecType pt;
56+
OpPrecType pt = OP_PREC_NONE;
5757
if (input->type == FP16) {
5858
pt = OP_PREC_FP16;
5959
} else if (input->type == FP32) {

ark/ops/ops_exp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ std::string ExpOp::function_name(const OpConfig &cfg) const
4747
Tensor *Model::exp(Tensor *input, Tensor *output, const string &name)
4848
{
4949
assert(input != nullptr);
50-
OpPrecType pt;
50+
OpPrecType pt = OP_PREC_NONE;
5151
if (input->type == FP16) {
5252
pt = OP_PREC_FP16;
5353
} else if (input->type == FP32) {

ark/ops/ops_gelu.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ std::string GeluOp::function_name(const OpConfig &cfg) const
4545
Tensor *Model::gelu(Tensor *input, Tensor *output, const std::string &name)
4646
{
4747
assert(input != nullptr);
48-
OpPrecType pt;
48+
OpPrecType pt = OP_PREC_NONE;
4949
if (input->type == FP16) {
5050
pt = OP_PREC_FP16;
5151
} else if (input->type == FP32) {

ark/ops/ops_im2col.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Tensor *Model::im2col(Tensor *input, int kernel_height, int kernel_width,
8585
Tensor *output, const std::string &name)
8686
{
8787
assert(input != nullptr);
88-
DimType n, c, h, w;
88+
DimType n = 1, c = 1, h = 1, w = 1;
8989
int input_ndims = input->ndims();
9090
if (input_ndims == 2) {
9191
n = 1;
@@ -107,7 +107,7 @@ Tensor *Model::im2col(Tensor *input, int kernel_height, int kernel_width,
107107
"invalid # of input dimensions. Expected 2, 3, or 4, but given ",
108108
input_ndims);
109109
}
110-
OpPrecType pt;
110+
OpPrecType pt = OP_PREC_NONE;
111111
if (input->type == FP16) {
112112
pt = OP_PREC_FP16;
113113
} else if (input->type == FP32) {

ark/ops/ops_layernorm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ std::string LayernormOp::function_name(const OpConfig &cfg) const
4646
Tensor *Model::layernorm(Tensor *input, Tensor *output, const std::string &name)
4747
{
4848
assert(input != nullptr);
49-
OpPrecType pt;
49+
OpPrecType pt = OP_PREC_NONE;
5050
if (input->type == FP16) {
5151
pt = OP_PREC_FP16;
5252
} else if (input->type == FP32) {

ark/ops/ops_matmul.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Tensor *Model::matmul(Tensor *mat_a, Tensor *mat_b, Tensor *mat_y,
136136
LOG(ERROR, "inner dimensions mismatch: ", k, " and ", k2);
137137
}
138138

139-
OpPrecType pt;
139+
OpPrecType pt = OP_PREC_NONE;
140140
if (mat_a->type == FP16) {
141141
pt = OP_PREC_FP16;
142142
} else if (mat_a->type == FP32) {

0 commit comments

Comments
 (0)