Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Linux build issues #25

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config.zdnn
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ case "${target}" in
CFLAGS_INIT="-O3 -mzvector -Wall -std=gnu99 -fstack-protector-all ${CFLAGS_INIT:-}"
CFLAGS_QUOTE_INIT="-Wall" # Not needed on Linux. Just repeat an option to prevent it from being empty.
CFLAGS_OPT_EXPENSIVE="-funroll-loops"
CFLAGS="-O3 -march=z16 -mzvector -Wall -std=gnu99 -fstack-protector-all ${CFLAGS_OPT_EXPENSIVE} ${CFLAGS:-}"
CFLAGS="-O3 -march=z14 -mzvector -Wall -std=gnu99 -fstack-protector-all ${CFLAGS_OPT_EXPENSIVE} ${CFLAGS:-}"
CFLAGS_QUOTE="-Wall"
CFLAGS_DEBUG="-O0 -g3 ${CFLAGS_DEBUG:-}"
CFLAGS_SHARED="-fPIC ${CFLAGS_SHARED:-}"
CFLAGS_ASM="-Wa,-adhln -fno-asynchronous-unwind-tables ${CFLAGS_ASM:-}"
CFLAGS_NOSEARCH=""
CXXFLAGS="-O3 -march=z16 -Wall ${CXXFLAGS:-}"
CXXFLAGS="-O3 -march=z14 -Wall ${CXXFLAGS:-}"
CPP_SYMCHECK_FLAGS="-E -o zdnn.i"
SODIR="${SODIR:-lib}"
LIBNAME="${LIBNAME:-libzdnn}"
Expand Down
10 changes: 10 additions & 0 deletions tests/testsupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ extern float ZERO_ARRAY[1];
// likely due to something's wrong with the testcase itself
#define GENERAL_TESTCASE_FAILURE 0xDEADBEEF

void nhwc_2_nchw(void *nhwc_ptr, uint32_t n, uint32_t h, uint32_t w, uint32_t c,
int element_size, void *nchw_ptr);
size_t *alloc_offsets(zdnn_ztensor *ztensor);
size_t *alloc_rnn_offsets(const zdnn_ztensor *ztensor);
size_t *alloc_rnn_output_offsets(const zdnn_ztensor *ztensor);
Expand Down Expand Up @@ -228,6 +230,10 @@ extern char error_message[ERROR_MESSAGE_STR_LENGTH];

extern zdnn_data_types test_datatype;

void UnityDefaultTestRunWithAllPreDataType(UnityTestFunction Func,
const char *FuncName,
const int FuncLineNum);

void UnityDefaultTestRunWithDLFloat16PreDataType(UnityTestFunction Func,
const char *FuncName,
const int FuncLineNum);
Expand All @@ -240,6 +246,10 @@ void UnityDefaultTestRunWithIndexPreDataType(UnityTestFunction Func,
const char *FuncName,
const int FuncLineNum);

void UnityDefaultTestRunWithAllTfrmdDataType(UnityTestFunction Func,
const char *FuncName,
const int FuncLineNum);

void UnityDefaultTestRunWithDLFloat16TfrmdDataType(UnityTestFunction Func,
const char *FuncName,
const int FuncLineNum);
Expand Down
Loading