Skip to content

Commit

Permalink
illegal instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyubin0 committed Feb 12, 2025
1 parent c5fdf19 commit 08141ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ntt/test/ctest/test_ntt_binary_add_fp16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ template <typename T, size_t vl> void test_vector() {
_TEST_VECTOR(T, 8)

TEST(UnaryTestAdd, vector) {
TEST_VECTOR(float)
TEST_VECTOR(half)
TEST_VECTOR(int32_t)
TEST_VECTOR(int64_t)
}
Expand Down
Empty file modified ntt/test/ctest/test_ntt_unary_abs_fp16.cpp
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions ntt/test/ntt_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,10 @@ bool compare_tensor(TTensor &lhs, TTensor &rhs, double threshold = 0.999f) {

bool pass = true;
nncase::ntt::apply(lhs.shape(), [&](auto index) {
auto d1 = (double)lhs(index);
auto d2 = (double)rhs(index);
auto d1 = static_cast<double>(
static_cast<typename TTensor::element_type>(lhs(index)));
auto d2 = static_cast<double>(
static_cast<typename TTensor::element_type>(rhs(index)));
v1.push_back(d1);
v2.push_back(d2);
if (d1 != d2) {
Expand Down

0 comments on commit 08141ae

Please # to comment.