Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
c530ccc3
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
403
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c530ccc3
编写于
3月 23, 2023
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(ci): update submodules
上级
9621f7ad
变更
26
显示空白变更内容
内联
并排
Showing
26 changed file
with
34 addition
and
42 deletion
+34
-42
CMakeLists.txt
CMakeLists.txt
+0
-6
dnn/test/aarch64/relayout.cpp
dnn/test/aarch64/relayout.cpp
+1
-1
dnn/test/arm_common/elemwise.cpp
dnn/test/arm_common/elemwise.cpp
+2
-2
dnn/test/arm_common/elemwise_multi_type.cpp
dnn/test/arm_common/elemwise_multi_type.cpp
+1
-1
dnn/test/common/small_vector.cpp
dnn/test/common/small_vector.cpp
+2
-2
dnn/test/cpu/relayout.cpp
dnn/test/cpu/relayout.cpp
+1
-1
dnn/test/cuda/elemwise.cpp
dnn/test/cuda/elemwise.cpp
+1
-1
dnn/test/cuda/elemwise_multi_type.cpp
dnn/test/cuda/elemwise_multi_type.cpp
+1
-1
dnn/test/cuda/relayout.cpp
dnn/test/cuda/relayout.cpp
+1
-1
dnn/test/fallback/elemwise.cpp
dnn/test/fallback/elemwise.cpp
+1
-1
dnn/test/fallback/elemwise_multi_type.cpp
dnn/test/fallback/elemwise_multi_type.cpp
+1
-1
dnn/test/fallback/relayout.cpp
dnn/test/fallback/relayout.cpp
+1
-1
dnn/test/rocm/elemwise.cpp
dnn/test/rocm/elemwise.cpp
+1
-1
dnn/test/rocm/relayout.cpp
dnn/test/rocm/relayout.cpp
+1
-1
dnn/test/x86/elemwise.cpp
dnn/test/x86/elemwise.cpp
+1
-1
dnn/test/x86/elemwise_multi_type.cpp
dnn/test/x86/elemwise_multi_type.cpp
+1
-1
imperative/src/include/megbrain/imperative/utils/platform.h
imperative/src/include/megbrain/imperative/utils/platform.h
+1
-1
src/core/test/comp_node.cpp
src/core/test/comp_node.cpp
+1
-1
src/core/test/static_mem_alloc.cpp
src/core/test/static_mem_alloc.cpp
+2
-2
src/gopt/test/basic_arith.cpp
src/gopt/test/basic_arith.cpp
+0
-2
src/jit/test/codegen.cpp
src/jit/test/codegen.cpp
+5
-5
src/jit/test/fusion.cpp
src/jit/test/fusion.cpp
+2
-2
src/opr/test/basic_arith/elemwise.cpp
src/opr/test/basic_arith/elemwise.cpp
+3
-3
third_party/cpp_redis
third_party/cpp_redis
+1
-1
third_party/gtest
third_party/gtest
+1
-1
third_party/intel-mkl-dnn
third_party/intel-mkl-dnn
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
c530ccc3
...
@@ -1089,11 +1089,6 @@ if(MGE_WITH_JIT AND MGE_WITH_HALIDE)
...
@@ -1089,11 +1089,6 @@ if(MGE_WITH_JIT AND MGE_WITH_HALIDE)
include
(
cmake/Halide.cmake
)
include
(
cmake/Halide.cmake
)
endif
()
endif
()
if
(
MGE_ENABLE_EXCEPTIONS
)
add_compile_definitions
(
CPP_REDIS_ENABLE_EXCEPTION=1
)
else
()
add_compile_definitions
(
CPP_REDIS_ENABLE_EXCEPTION=0
)
endif
()
include
(
cmake/cpp_redis.cmake
)
include
(
cmake/cpp_redis.cmake
)
# Thread
# Thread
...
@@ -1138,7 +1133,6 @@ if(MSVC OR WIN32)
...
@@ -1138,7 +1133,6 @@ if(MSVC OR WIN32)
endif
()
endif
()
if
(
CMAKE_THREAD_LIBS_INIT
if
(
CMAKE_THREAD_LIBS_INIT
OR CMAKE_HAVE_LIBC_PTHREAD
OR CMAKE_USE_WIN32_THREADS_INIT
OR CMAKE_USE_WIN32_THREADS_INIT
OR ANDROID
)
OR ANDROID
)
set
(
MGB_HAVE_THREAD 1
)
set
(
MGB_HAVE_THREAD 1
)
...
...
dnn/test/aarch64/relayout.cpp
浏览文件 @
c530ccc3
...
@@ -12,7 +12,7 @@ namespace test {
...
@@ -12,7 +12,7 @@ namespace test {
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
AARCH64_RELAYOUT
:
public
AARCH64
{};
class
AARCH64_RELAYOUT
:
public
AARCH64
{};
TYPED_TEST_
SUIT
E
(
AARCH64_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST_
CAS
E
(
AARCH64_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST
(
AARCH64_RELAYOUT
,
run
)
{
TYPED_TEST
(
AARCH64_RELAYOUT
,
run
)
{
relayout
::
run_test
<
TypeParam
>
(
this
->
handle
());
relayout
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
...
...
dnn/test/arm_common/elemwise.cpp
浏览文件 @
c530ccc3
...
@@ -12,14 +12,14 @@ using namespace test;
...
@@ -12,14 +12,14 @@ using namespace test;
template
<
typename
tag
>
template
<
typename
tag
>
class
ARM_ELEMWISE
:
public
ARM_COMMON
{};
class
ARM_ELEMWISE
:
public
ARM_COMMON
{};
TYPED_TEST_
SUIT
E
(
ARM_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST_
CAS
E
(
ARM_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST
(
ARM_ELEMWISE
,
run
)
{
TYPED_TEST
(
ARM_ELEMWISE
,
run
)
{
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
template
<
typename
tag
>
template
<
typename
tag
>
class
ARM_ELEMWISE_MULTI_THREADS
:
public
ARM_COMMON_MULTI_THREADS
{};
class
ARM_ELEMWISE_MULTI_THREADS
:
public
ARM_COMMON_MULTI_THREADS
{};
TYPED_TEST_
SUIT
E
(
ARM_ELEMWISE_MULTI_THREADS
,
elemwise
::
test_types
);
TYPED_TEST_
CAS
E
(
ARM_ELEMWISE_MULTI_THREADS
,
elemwise
::
test_types
);
TYPED_TEST
(
ARM_ELEMWISE_MULTI_THREADS
,
run
)
{
TYPED_TEST
(
ARM_ELEMWISE_MULTI_THREADS
,
run
)
{
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
...
...
dnn/test/arm_common/elemwise_multi_type.cpp
浏览文件 @
c530ccc3
...
@@ -14,7 +14,7 @@ using namespace test;
...
@@ -14,7 +14,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
ARM_COMMON_ELEMWISE_MULTI_TYPE
:
public
ARM_COMMON
{};
class
ARM_COMMON_ELEMWISE_MULTI_TYPE
:
public
ARM_COMMON
{};
TYPED_TEST_
SUIT
E
(
ARM_COMMON_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
TYPED_TEST_
CAS
E
(
ARM_COMMON_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
}
// anonymous namespace
}
// anonymous namespace
TYPED_TEST
(
ARM_COMMON_ELEMWISE_MULTI_TYPE
,
run
)
{
TYPED_TEST
(
ARM_COMMON_ELEMWISE_MULTI_TYPE
,
run
)
{
...
...
dnn/test/common/small_vector.cpp
浏览文件 @
c530ccc3
...
@@ -231,7 +231,7 @@ typedef ::testing::Types<
...
@@ -231,7 +231,7 @@ typedef ::testing::Types<
SmallVector
<
Constructable
,
2
>
,
SmallVector
<
Constructable
,
4
>
,
SmallVector
<
Constructable
,
2
>
,
SmallVector
<
Constructable
,
4
>
,
SmallVector
<
Constructable
,
5
>>
SmallVector
<
Constructable
,
5
>>
SmallVectorTestTypes
;
SmallVectorTestTypes
;
TYPED_TEST_
SUIT
E
(
SmallVectorTest
,
SmallVectorTestTypes
);
TYPED_TEST_
CAS
E
(
SmallVectorTest
,
SmallVectorTestTypes
);
// Constructor test.
// Constructor test.
TYPED_TEST
(
SmallVectorTest
,
ConstructorNonIterTest
)
{
TYPED_TEST
(
SmallVectorTest
,
ConstructorNonIterTest
)
{
SCOPED_TRACE
(
"ConstructorTest"
);
SCOPED_TRACE
(
"ConstructorTest"
);
...
@@ -836,7 +836,7 @@ typedef ::testing::Types<
...
@@ -836,7 +836,7 @@ typedef ::testing::Types<
std
::
pair
<
SmallVector
<
Constructable
,
2
>
,
SmallVector
<
Constructable
,
2
>>>
std
::
pair
<
SmallVector
<
Constructable
,
2
>
,
SmallVector
<
Constructable
,
2
>>>
DualSmallVectorTestTypes
;
DualSmallVectorTestTypes
;
TYPED_TEST_
SUIT
E
(
DualSmallVectorsTest
,
DualSmallVectorTestTypes
);
TYPED_TEST_
CAS
E
(
DualSmallVectorsTest
,
DualSmallVectorTestTypes
);
TYPED_TEST
(
DualSmallVectorsTest
,
MoveAssignment
)
{
TYPED_TEST
(
DualSmallVectorsTest
,
MoveAssignment
)
{
SCOPED_TRACE
(
"MoveAssignTest-DualVectorTypes"
);
SCOPED_TRACE
(
"MoveAssignTest-DualVectorTypes"
);
...
...
dnn/test/cpu/relayout.cpp
浏览文件 @
c530ccc3
...
@@ -12,7 +12,7 @@ using namespace test;
...
@@ -12,7 +12,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
CPU_RELAYOUT
:
public
CPU
{};
class
CPU_RELAYOUT
:
public
CPU
{};
TYPED_TEST_
SUIT
E
(
CPU_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST_
CAS
E
(
CPU_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST
(
CPU_RELAYOUT
,
run
)
{
TYPED_TEST
(
CPU_RELAYOUT
,
run
)
{
relayout
::
run_test
<
TypeParam
>
(
this
->
handle
());
relayout
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
...
...
dnn/test/cuda/elemwise.cpp
浏览文件 @
c530ccc3
...
@@ -71,7 +71,7 @@ void run_tensor_add(
...
@@ -71,7 +71,7 @@ void run_tensor_add(
template
<
typename
tag
>
template
<
typename
tag
>
class
CUDA_ELEMWISE
:
public
CUDA
{};
class
CUDA_ELEMWISE
:
public
CUDA
{};
TYPED_TEST_
SUIT
E
(
CUDA_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST_
CAS
E
(
CUDA_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST
(
CUDA_ELEMWISE
,
run
)
{
TYPED_TEST
(
CUDA_ELEMWISE
,
run
)
{
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle_cuda
());
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle_cuda
());
}
}
...
...
dnn/test/cuda/elemwise_multi_type.cpp
浏览文件 @
c530ccc3
...
@@ -13,7 +13,7 @@ using namespace test;
...
@@ -13,7 +13,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
CUDA_ELEMWISE_MULTI_TYPE
:
public
CUDA
{};
class
CUDA_ELEMWISE_MULTI_TYPE
:
public
CUDA
{};
TYPED_TEST_
SUIT
E
(
CUDA_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
TYPED_TEST_
CAS
E
(
CUDA_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
}
// anonymous namespace
}
// anonymous namespace
TYPED_TEST
(
CUDA_ELEMWISE_MULTI_TYPE
,
run
)
{
TYPED_TEST
(
CUDA_ELEMWISE_MULTI_TYPE
,
run
)
{
...
...
dnn/test/cuda/relayout.cpp
浏览文件 @
c530ccc3
...
@@ -11,7 +11,7 @@ using namespace test;
...
@@ -11,7 +11,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
CUDA_RELAYOUT
:
public
CUDA
{};
class
CUDA_RELAYOUT
:
public
CUDA
{};
TYPED_TEST_
SUIT
E
(
CUDA_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST_
CAS
E
(
CUDA_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST
(
CUDA_RELAYOUT
,
run
)
{
TYPED_TEST
(
CUDA_RELAYOUT
,
run
)
{
relayout
::
run_test
<
TypeParam
>
(
this
->
handle_cuda
());
relayout
::
run_test
<
TypeParam
>
(
this
->
handle_cuda
());
}
}
...
...
dnn/test/fallback/elemwise.cpp
浏览文件 @
c530ccc3
...
@@ -11,7 +11,7 @@ using namespace test;
...
@@ -11,7 +11,7 @@ using namespace test;
template
<
typename
tag
>
template
<
typename
tag
>
class
FALLBACK_ELEMWISE
:
public
FALLBACK
{};
class
FALLBACK_ELEMWISE
:
public
FALLBACK
{};
TYPED_TEST_
SUIT
E
(
FALLBACK_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST_
CAS
E
(
FALLBACK_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST
(
FALLBACK_ELEMWISE
,
run
)
{
TYPED_TEST
(
FALLBACK_ELEMWISE
,
run
)
{
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
...
...
dnn/test/fallback/elemwise_multi_type.cpp
浏览文件 @
c530ccc3
...
@@ -8,7 +8,7 @@ using namespace test;
...
@@ -8,7 +8,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
FALLBACK_ELEMWISE_MULTI_TYPE
:
public
FALLBACK
{};
class
FALLBACK_ELEMWISE_MULTI_TYPE
:
public
FALLBACK
{};
TYPED_TEST_
SUIT
E
(
FALLBACK_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
TYPED_TEST_
CAS
E
(
FALLBACK_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
}
// anonymous namespace
}
// anonymous namespace
TYPED_TEST
(
FALLBACK_ELEMWISE_MULTI_TYPE
,
run
)
{
TYPED_TEST
(
FALLBACK_ELEMWISE_MULTI_TYPE
,
run
)
{
...
...
dnn/test/fallback/relayout.cpp
浏览文件 @
c530ccc3
...
@@ -14,7 +14,7 @@ using namespace test;
...
@@ -14,7 +14,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
FALLBACK_RELAYOUT
:
public
FALLBACK
{};
class
FALLBACK_RELAYOUT
:
public
FALLBACK
{};
TYPED_TEST_
SUIT
E
(
FALLBACK_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST_
CAS
E
(
FALLBACK_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST
(
FALLBACK_RELAYOUT
,
run
)
{
TYPED_TEST
(
FALLBACK_RELAYOUT
,
run
)
{
relayout
::
run_test
<
TypeParam
>
(
this
->
handle
());
relayout
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
...
...
dnn/test/rocm/elemwise.cpp
浏览文件 @
c530ccc3
...
@@ -52,7 +52,7 @@ void run_elemwise_benchmark(
...
@@ -52,7 +52,7 @@ void run_elemwise_benchmark(
template
<
typename
tag
>
template
<
typename
tag
>
class
ROCM_ELEMWISE
:
public
ROCM
{};
class
ROCM_ELEMWISE
:
public
ROCM
{};
TYPED_TEST_
SUIT
E
(
ROCM_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST_
CAS
E
(
ROCM_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST
(
ROCM_ELEMWISE
,
run
)
{
TYPED_TEST
(
ROCM_ELEMWISE
,
run
)
{
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle_rocm
());
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle_rocm
());
}
}
...
...
dnn/test/rocm/relayout.cpp
浏览文件 @
c530ccc3
...
@@ -13,7 +13,7 @@ using namespace test;
...
@@ -13,7 +13,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
ROCM_RELAYOUT
:
public
ROCM
{};
class
ROCM_RELAYOUT
:
public
ROCM
{};
TYPED_TEST_
SUIT
E
(
ROCM_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST_
CAS
E
(
ROCM_RELAYOUT
,
relayout
::
test_types
);
TYPED_TEST
(
ROCM_RELAYOUT
,
run
)
{
TYPED_TEST
(
ROCM_RELAYOUT
,
run
)
{
relayout
::
run_test
<
TypeParam
>
(
this
->
handle_rocm
());
relayout
::
run_test
<
TypeParam
>
(
this
->
handle_rocm
());
}
}
...
...
dnn/test/x86/elemwise.cpp
浏览文件 @
c530ccc3
...
@@ -212,7 +212,7 @@ TEST_F(X86, ELEMWISE_FORWARD_TERNARY) {
...
@@ -212,7 +212,7 @@ TEST_F(X86, ELEMWISE_FORWARD_TERNARY) {
template
<
typename
tag
>
template
<
typename
tag
>
class
X86_ELEMWISE
:
public
X86
{};
class
X86_ELEMWISE
:
public
X86
{};
TYPED_TEST_
SUIT
E
(
X86_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST_
CAS
E
(
X86_ELEMWISE
,
elemwise
::
test_types
);
TYPED_TEST
(
X86_ELEMWISE
,
run
)
{
TYPED_TEST
(
X86_ELEMWISE
,
run
)
{
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
elemwise
::
run_test
<
TypeParam
>
(
this
->
handle
());
}
}
...
...
dnn/test/x86/elemwise_multi_type.cpp
浏览文件 @
c530ccc3
...
@@ -11,7 +11,7 @@ using namespace test;
...
@@ -11,7 +11,7 @@ using namespace test;
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
X86_ELEMWISE_MULTI_TYPE
:
public
X86
{};
class
X86_ELEMWISE_MULTI_TYPE
:
public
X86
{};
TYPED_TEST_
SUIT
E
(
X86_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
TYPED_TEST_
CAS
E
(
X86_ELEMWISE_MULTI_TYPE
,
elemwise_multi_type
::
test_types
);
}
// anonymous namespace
}
// anonymous namespace
TYPED_TEST
(
X86_ELEMWISE_MULTI_TYPE
,
run
)
{
TYPED_TEST
(
X86_ELEMWISE_MULTI_TYPE
,
run
)
{
...
...
imperative/src/include/megbrain/imperative/utils/platform.h
浏览文件 @
c530ccc3
#pragma once
#pragma once
#include <string>
#include <string>
#include <typeinfo>
namespace
mgb
::
imperative
{
namespace
mgb
::
imperative
{
std
::
string
demangle
(
std
::
string
mangled
);
std
::
string
demangle
(
std
::
string
mangled
);
...
...
src/core/test/comp_node.cpp
浏览文件 @
c530ccc3
...
@@ -789,7 +789,7 @@ TEST(TestCompNode, DepedentObjectList) {
...
@@ -789,7 +789,7 @@ TEST(TestCompNode, DepedentObjectList) {
namespace
{
namespace
{
template
<
typename
tag
>
template
<
typename
tag
>
class
TestCPUCompSeqRec
:
public
::
testing
::
Test
{};
class
TestCPUCompSeqRec
:
public
::
testing
::
Test
{};
TYPED_TEST_
SUIT
E
(
TestCPUCompSeqRec
,
comp_node_test
::
seq_rec
::
test_types
);
TYPED_TEST_
CAS
E
(
TestCPUCompSeqRec
,
comp_node_test
::
seq_rec
::
test_types
);
TYPED_TEST
(
TestCPUCompSeqRec
,
run
)
{
TYPED_TEST
(
TestCPUCompSeqRec
,
run
)
{
comp_node_test
::
seq_rec
::
run
<
TypeParam
>
(
CompNode
::
load
(
"cpux"
));
comp_node_test
::
seq_rec
::
run
<
TypeParam
>
(
CompNode
::
load
(
"cpux"
));
}
}
...
...
src/core/test/static_mem_alloc.cpp
浏览文件 @
c530ccc3
...
@@ -124,7 +124,7 @@ TEST_P(BasicCorrectness, OverwriteSameEnd) {
...
@@ -124,7 +124,7 @@ TEST_P(BasicCorrectness, OverwriteSameEnd) {
ASSERT_EQ
(
align
(
1
+
padding
()),
allocator
->
tot_alloc_lower_bound
());
ASSERT_EQ
(
align
(
1
+
padding
()),
allocator
->
tot_alloc_lower_bound
());
}
}
INSTANTIATE_TEST_
SUIT
E_P
(
INSTANTIATE_TEST_
CAS
E_P
(
TestStaticMemAllocAlgo
,
BasicCorrectness
,
TestStaticMemAllocAlgo
,
BasicCorrectness
,
TestParam
::
make_values
({
1
,
2
},
{
1
,
2
},
{
1
}));
TestParam
::
make_values
({
1
,
2
},
{
1
,
2
},
{
1
}));
...
@@ -207,7 +207,7 @@ TEST_P(RandomOpr, Main) {
...
@@ -207,7 +207,7 @@ TEST_P(RandomOpr, Main) {
timer
.
get_secs
(),
sz_tot
,
sz_lower
,
double
(
sz_tot
)
/
sz_lower
-
1
);
timer
.
get_secs
(),
sz_tot
,
sz_lower
,
double
(
sz_tot
)
/
sz_lower
-
1
);
}
}
INSTANTIATE_TEST_
SUIT
E_P
(
INSTANTIATE_TEST_
CAS
E_P
(
TestStaticMemAllocAlgo
,
RandomOpr
,
TestStaticMemAllocAlgo
,
RandomOpr
,
TestParam
::
make_values
(
TestParam
::
make_values
(
{
1
,
256
},
{
1
,
32
},
{
10
,
INTERVAL_MOVE_MAX_SIZE
,
1000
,
10000
}));
{
1
,
256
},
{
1
,
32
},
{
10
,
INTERVAL_MOVE_MAX_SIZE
,
1000
,
10000
}));
...
...
src/gopt/test/basic_arith.cpp
浏览文件 @
c530ccc3
...
@@ -107,13 +107,11 @@ TEST(TestGoptBasicArithInplace, Absorbing) {
...
@@ -107,13 +107,11 @@ TEST(TestGoptBasicArithInplace, Absorbing) {
ASSERT_EQ
(
y
.
as_immutable_scalar
()
->
get_cast
<
float
>
(),
0.
f
);
ASSERT_EQ
(
y
.
as_immutable_scalar
()
->
get_cast
<
float
>
(),
0.
f
);
}
}
namespace
{
auto
gen_postive
=
[](
HostTensorND
&
dest
)
{
auto
gen_postive
=
[](
HostTensorND
&
dest
)
{
HostTensorGenerator
<
dtype
::
Float32
,
RandomDistribution
::
UNIFORM
>
mask_generator
{
HostTensorGenerator
<
dtype
::
Float32
,
RandomDistribution
::
UNIFORM
>
mask_generator
{
2.
f
,
4.
f
};
2.
f
,
4.
f
};
dest
=
*
mask_generator
(
dest
.
shape
(),
dest
.
comp_node
());
dest
=
*
mask_generator
(
dest
.
shape
(),
dest
.
comp_node
());
};
};
};
TEST
(
TestGoptBasicArithInplace
,
LogExpExpand
)
{
TEST
(
TestGoptBasicArithInplace
,
LogExpExpand
)
{
// test log(exp(a) * (exp(b) / (exp(c) * d**2))) -> a + b - c - log(d**2)
// test log(exp(a) * (exp(b) / (exp(c) * d**2))) -> a + b - c - log(d**2)
...
...
src/jit/test/codegen.cpp
浏览文件 @
c530ccc3
...
@@ -290,7 +290,7 @@ void run_mlir_mode(CompNode cn) {
...
@@ -290,7 +290,7 @@ void run_mlir_mode(CompNode cn) {
#if MGB_JIT_HALIDE
#if MGB_JIT_HALIDE
template
<
typename
tag
>
template
<
typename
tag
>
class
TestJITHalideCodeGenCuda
:
public
::
testing
::
Test
{};
class
TestJITHalideCodeGenCuda
:
public
::
testing
::
Test
{};
TYPED_TEST_
SUIT
E
(
TestJITHalideCodeGenCuda
,
test_types
);
TYPED_TEST_
CAS
E
(
TestJITHalideCodeGenCuda
,
test_types
);
TYPED_TEST
(
TestJITHalideCodeGenCuda
,
run
)
{
TYPED_TEST
(
TestJITHalideCodeGenCuda
,
run
)
{
REQUIRE_GPU
(
1
);
REQUIRE_GPU
(
1
);
run
<
TypeParam
>
(
Backend
::
HALIDE
,
CompNode
::
load
(
"gpu0"
));
run
<
TypeParam
>
(
Backend
::
HALIDE
,
CompNode
::
load
(
"gpu0"
));
...
@@ -301,7 +301,7 @@ TYPED_TEST(TestJITHalideCodeGenCuda, run) {
...
@@ -301,7 +301,7 @@ TYPED_TEST(TestJITHalideCodeGenCuda, run) {
template
<
typename
tag
>
template
<
typename
tag
>
class
TestJITNvrtcCodeGen
:
public
::
testing
::
Test
{};
class
TestJITNvrtcCodeGen
:
public
::
testing
::
Test
{};
TYPED_TEST_
SUIT
E
(
TestJITNvrtcCodeGen
,
test_types
);
TYPED_TEST_
CAS
E
(
TestJITNvrtcCodeGen
,
test_types
);
TYPED_TEST
(
TestJITNvrtcCodeGen
,
run
)
{
TYPED_TEST
(
TestJITNvrtcCodeGen
,
run
)
{
REQUIRE_GPU
(
1
);
REQUIRE_GPU
(
1
);
run
<
TypeParam
>
(
Backend
::
NVRTC
,
CompNode
::
load
(
"gpu0"
));
run
<
TypeParam
>
(
Backend
::
NVRTC
,
CompNode
::
load
(
"gpu0"
));
...
@@ -344,7 +344,7 @@ FOREACH_UNARY_MODE(def_tag)
...
@@ -344,7 +344,7 @@ FOREACH_UNARY_MODE(def_tag)
#define t(n) n,
#define t(n) n,
using
mlir_elemwise_unary_types
=
::
testing
::
Types
<
FOREACH_UNARY_MODE
(
t
)
ABS
>
;
using
mlir_elemwise_unary_types
=
::
testing
::
Types
<
FOREACH_UNARY_MODE
(
t
)
ABS
>
;
#undef t
#undef t
TYPED_TEST_
SUIT
E
(
TestJITMlirUnaryElemwise
,
mlir_elemwise_unary_types
);
TYPED_TEST_
CAS
E
(
TestJITMlirUnaryElemwise
,
mlir_elemwise_unary_types
);
#define SKIP_MODE(_mode) \
#define SKIP_MODE(_mode) \
if (TypeParam::mode == opr::Elemwise::Mode::_mode) { \
if (TypeParam::mode == opr::Elemwise::Mode::_mode) { \
...
@@ -390,7 +390,7 @@ FOREACH_BINARY_MODE(def_tag)
...
@@ -390,7 +390,7 @@ FOREACH_BINARY_MODE(def_tag)
#define t(n) n,
#define t(n) n,
using
mlir_elemwise_binary_types
=
::
testing
::
Types
<
FOREACH_BINARY_MODE
(
t
)
ADD
>
;
using
mlir_elemwise_binary_types
=
::
testing
::
Types
<
FOREACH_BINARY_MODE
(
t
)
ADD
>
;
#undef t
#undef t
TYPED_TEST_
SUIT
E
(
TestJITMlirBinaryElemwise
,
mlir_elemwise_binary_types
);
TYPED_TEST_
CAS
E
(
TestJITMlirBinaryElemwise
,
mlir_elemwise_binary_types
);
TYPED_TEST
(
TestJITMlirBinaryElemwise
,
run
)
{
TYPED_TEST
(
TestJITMlirBinaryElemwise
,
run
)
{
auto
cn
=
CompNode
::
load
(
"cpu0"
);
auto
cn
=
CompNode
::
load
(
"cpu0"
);
run_mlir_mode
<
TypeParam
,
2
>
(
cn
);
run_mlir_mode
<
TypeParam
,
2
>
(
cn
);
...
@@ -422,7 +422,7 @@ FOREACH_TERNARY_MODE(def_tag)
...
@@ -422,7 +422,7 @@ FOREACH_TERNARY_MODE(def_tag)
using
mlir_elemwise_ternary_types
=
using
mlir_elemwise_ternary_types
=
::
testing
::
Types
<
FOREACH_TERNARY_MODE
(
t
)
COND_LEQ_MOV
>
;
::
testing
::
Types
<
FOREACH_TERNARY_MODE
(
t
)
COND_LEQ_MOV
>
;
#undef t
#undef t
TYPED_TEST_
SUIT
E
(
TestJITMlirTernaryElemwise
,
mlir_elemwise_ternary_types
);
TYPED_TEST_
CAS
E
(
TestJITMlirTernaryElemwise
,
mlir_elemwise_ternary_types
);
TYPED_TEST
(
TestJITMlirTernaryElemwise
,
run
)
{
TYPED_TEST
(
TestJITMlirTernaryElemwise
,
run
)
{
auto
cn
=
CompNode
::
load
(
"cpu0"
);
auto
cn
=
CompNode
::
load
(
"cpu0"
);
run_mlir_mode
<
TypeParam
,
3
>
(
cn
);
run_mlir_mode
<
TypeParam
,
3
>
(
cn
);
...
...
src/jit/test/fusion.cpp
浏览文件 @
c530ccc3
...
@@ -1147,7 +1147,7 @@ TEST(TestJITFusionHalide, SameGradOpr) {
...
@@ -1147,7 +1147,7 @@ TEST(TestJITFusionHalide, SameGradOpr) {
template
<
typename
tag
>
template
<
typename
tag
>
class
TestJITHalideFusionCuda
:
public
::
testing
::
Test
{};
class
TestJITHalideFusionCuda
:
public
::
testing
::
Test
{};
TYPED_TEST_
SUIT
E
(
TestJITHalideFusionCuda
,
test_types
);
TYPED_TEST_
CAS
E
(
TestJITHalideFusionCuda
,
test_types
);
TYPED_TEST
(
TestJITHalideFusionCuda
,
run
)
{
TYPED_TEST
(
TestJITHalideFusionCuda
,
run
)
{
set_backend
(
Backend
::
NONE
);
set_backend
(
Backend
::
NONE
);
...
@@ -1160,7 +1160,7 @@ TYPED_TEST(TestJITHalideFusionCuda, run) {
...
@@ -1160,7 +1160,7 @@ TYPED_TEST(TestJITHalideFusionCuda, run) {
template
<
typename
tag
>
template
<
typename
tag
>
class
TestJITNvrtcFusion
:
public
::
testing
::
Test
{};
class
TestJITNvrtcFusion
:
public
::
testing
::
Test
{};
TYPED_TEST_
SUIT
E
(
TestJITNvrtcFusion
,
test_types
);
TYPED_TEST_
CAS
E
(
TestJITNvrtcFusion
,
test_types
);
TYPED_TEST
(
TestJITNvrtcFusion
,
run
)
{
TYPED_TEST
(
TestJITNvrtcFusion
,
run
)
{
set_backend
(
Backend
::
NONE
);
set_backend
(
Backend
::
NONE
);
...
...
src/opr/test/basic_arith/elemwise.cpp
浏览文件 @
c530ccc3
...
@@ -812,7 +812,7 @@ typedef ::testing::Types<
...
@@ -812,7 +812,7 @@ typedef ::testing::Types<
void
// extra void to consume last comma
void
// extra void to consume last comma
>
>
UnaryTraitTypes
;
UnaryTraitTypes
;
TYPED_TEST_
SUIT
E
(
TestOprBasicArithUnaryElemwise
,
UnaryTraitTypes
);
TYPED_TEST_
CAS
E
(
TestOprBasicArithUnaryElemwise
,
UnaryTraitTypes
);
typedef
::
testing
::
Types
<
typedef
::
testing
::
Types
<
#define DEF_TRAIT(_mode, _expr) _mode,
#define DEF_TRAIT(_mode, _expr) _mode,
...
@@ -821,7 +821,7 @@ typedef ::testing::Types<
...
@@ -821,7 +821,7 @@ typedef ::testing::Types<
void
// extra void to consume last comma
void
// extra void to consume last comma
>
>
BinaryTraitTypes
;
BinaryTraitTypes
;
TYPED_TEST_
SUIT
E
(
TestOprBasicArithBinaryElemwise
,
BinaryTraitTypes
);
TYPED_TEST_
CAS
E
(
TestOprBasicArithBinaryElemwise
,
BinaryTraitTypes
);
typedef
::
testing
::
Types
<
typedef
::
testing
::
Types
<
#define DEF_TRAIT(_mode, _expr) _mode,
#define DEF_TRAIT(_mode, _expr) _mode,
...
@@ -830,7 +830,7 @@ typedef ::testing::Types<
...
@@ -830,7 +830,7 @@ typedef ::testing::Types<
void
// extra void to consume last comma
void
// extra void to consume last comma
>
>
TernaryTraitTypes
;
TernaryTraitTypes
;
TYPED_TEST_
SUIT
E
(
TestOprBasicArithTernaryElemwise
,
TernaryTraitTypes
);
TYPED_TEST_
CAS
E
(
TestOprBasicArithTernaryElemwise
,
TernaryTraitTypes
);
}
// anonymous namespace
}
// anonymous namespace
...
...
cpp_redis
@
220cb9b5
比较
c8799e8f
...
220cb9b5
Subproject commit
c8799e8fb2dfe8e9b91c826178bc0741a1cceec9
Subproject commit
220cb9b5247863d79ffb71e429c4b8e016e269a6
gtest
@
15460959
比较
703bd9ca
...
15460959
Subproject commit
703bd9caab50b139428cea1aaff9974ebee5742e
Subproject commit
15460959cbbfa20e66ef0b5ab497367e47fc0a04
intel-mkl-dnn
@
0d659f39
比较
4ade75c3
...
0d659f39
Subproject commit
4ade75c386c8bea56bd60529b021d8b853d62617
Subproject commit
0d659f394e15a653caa7ca651c7e433a3d284ac4
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录