Commit ecb6793b authored by PanZezhong's avatar PanZezhong
Browse files

issue/78 添加utils target

parent be731358
#include "../../check.h"
#include "../../utils.h"
#include "infinirt_cuda.cuh"
#include <cuda_runtime.h>
......
#ifndef INFINIUTILS_H
#define INFINIUTILS_H
#include "utils/check.h"
#include "utils/rearrange.h"
#endif
#ifndef INFINI_CHECK_H
#define INFINI_CHECK_H
#ifndef INFINIUTILS_CHECK_H
#define INFINIUTILS_CHECK_H
#include <iostream>
#define CHECK_API_OR(API, EXPECT, ACTION) \
......@@ -15,4 +15,4 @@
#define CHECK_INTERNAL(API, EXPECT) CHECK_API_OR(API, EXPECT, return INFINI_STATUS_INTERNAL_ERROR)
#endif // INFINI_CHECK_H
#endif // INFINIUTILS_CHECK_H
#include "rearrange.h"
#ifndef INFINIUTILS_REARRANGE_H
#define INFINIUTILS_REARRANGE_H
#include <stddef.h>
void rearrange(void *dst,
const void *src,
const size_t *shape,
const ptrdiff_t *dst_strides,
const ptrdiff_t *src_strides,
const size_t ndim,
size_t element_size);
#endif // INFINIUTILS_REARRANGE_H
......@@ -112,9 +112,15 @@ if has_config("kunlun-xpu") then
includes("xmake/kunlun.lua")
end
target("infini-utils")
set_kind("static")
set_languages("cxx17")
add_files("src/utils/*.cc")
target_end()
target("infiniop")
set_kind("shared")
add_deps("infini-utils")
if has_config("cpu") then
add_deps("infiniop-cpu")
end
......@@ -162,6 +168,7 @@ target_end()
target("infinirt")
set_kind("shared")
add_deps("infini-utils")
if has_config("cpu") then
add_deps("infinirt-cpu")
end
......
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