Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
b59e8ccf
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看板
提交
b59e8ccf
编写于
11月 17, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mgb): fix cambricon bangc copybara
GitOrigin-RevId: 22b57364e8ab4f2fadec41447a984b921742ab5e
上级
3116e128
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
59 deletion
+0
-59
CMakeLists.txt
CMakeLists.txt
+0
-29
dnn/src/CMakeLists.txt
dnn/src/CMakeLists.txt
+0
-17
dnn/test/CMakeLists.txt
dnn/test/CMakeLists.txt
+0
-5
src/core/impl/comp_node_env.cpp
src/core/impl/comp_node_env.cpp
+0
-8
未找到文件。
CMakeLists.txt
浏览文件 @
b59e8ccf
...
...
@@ -798,34 +798,6 @@ endif()
if
(
MGE_WITH_CAMBRICON
)
include_directories
(
"$ENV{NEUWARE_HOME}/include"
)
link_directories
(
"$ENV{NEUWARE_HOME}/lib64"
)
include
(
cmake/FindBANG/FindBANG.cmake
)
if
(
${
MGE_MLU_ARCH
}
STREQUAL
"MLU100"
)
set
(
BANG_ARCH
"100"
)
elseif
(
${
MGE_MLU_ARCH
}
STREQUAL
"MLU1h8"
)
set
(
BANG_ARCH
"110"
)
elseif
(
${
MGE_MLU_ARCH
}
STREQUAL
"MLU220"
)
set
(
BANG_ARCH
"220"
)
elseif
(
${
MGE_MLU_ARCH
}
STREQUAL
"MLU270"
)
set
(
BANG_ARCH
"270"
)
elseif
(
${
MGE_MLU_ARCH
}
STREQUAL
"MLU290"
)
set
(
BANG_ARCH
"290"
)
elseif
(
${
MGE_MLU_ARCH
}
STREQUAL
"MLU200"
)
set
(
BANG_ARCH
"200"
)
else
()
message
(
FATAL_ERROR
"Unsupported MLU arch."
)
endif
()
set
(
BANG_CNCC_FLAGS
"
${
BANG_CNCC_FLAGS
}
--bang-mlu-arch=
${
MGE_MLU_ARCH
}
"
)
set
(
BANG_CNCC_FLAGS
"
${
BANG_CNCC_FLAGS
}
-std=c++11 -Werror"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-D__BANG_ARCH__=
${
BANG_ARCH
}
"
)
if
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Debug"
)
set
(
BANG_CNCC_FLAGS
"
${
BANG_CNCC_FLAGS
}
-g -O0"
)
elseif
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Release"
)
set
(
BANG_CNCC_FLAGS
"
${
BANG_CNCC_FLAGS
}
-O3"
)
elseif
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"RelWithDebInfo"
)
set
(
BANG_CNCC_FLAGS
"
${
BANG_CNCC_FLAGS
}
-g -O3"
)
elseif
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"MinSizeRel"
)
set
(
BANG_CNCC_FLAGS
"
${
BANG_CNCC_FLAGS
}
-Os"
)
endif
()
include
(
cmake/cnrt.cmake
)
include
(
cmake/cndev.cmake
)
include
(
cmake/cnml.cmake
)
...
...
@@ -957,7 +929,6 @@ set(MEGDNN_WITH_ROCM ${MGE_WITH_ROCM})
# CAMBRICON
set
(
MGB_CAMBRICON
${
MGE_WITH_CAMBRICON
}
)
set
(
MEGDNN_WITH_CAMBRICON
${
MGE_WITH_CAMBRICON
}
)
# ENFLAME
set
(
MGB_ENFLAME
${
MGE_WITH_ENFLAME
}
)
...
...
dnn/src/CMakeLists.txt
浏览文件 @
b59e8ccf
...
...
@@ -163,19 +163,6 @@ if(MGE_WITH_CUDA)
list
(
APPEND SOURCES
${
CUSOURCES
}
)
endif
()
if
(
MGE_WITH_CAMBRICON
)
file
(
GLOB_RECURSE SOURCES_ cambricon/*.cpp
)
list
(
APPEND SOURCES
${
SOURCES_
}
)
file
(
GLOB_RECURSE BANG_SOURCES cambricon/*.mlu
)
list
(
APPEND MEGDNN_INCLUDES
"
${
PROJECT_SOURCE_DIR
}
/dnn/include"
)
list
(
APPEND MEGDNN_INCLUDES
"
${
PROJECT_SOURCE_DIR
}
/dnn"
)
list
(
APPEND MEGDNN_INCLUDES
"
${
PROJECT_BINARY_DIR
}
/genfiles"
)
bang_compile
(
BANG_OBJS
"
${
BANG_SOURCES
}
"
"
${
MEGDNN_INCLUDES
}
"
)
list
(
APPEND SOURCES
${
BANG_OBJS
}
)
endif
()
if
(
MGE_WITH_ATLAS
)
file
(
GLOB_RECURSE SOURCES_ atlas/*.cpp
)
list
(
APPEND SOURCES
${
SOURCES_
}
)
...
...
@@ -264,8 +251,4 @@ if(CMAKE_THREAD_LIBS_INIT)
target_link_libraries
(
megdnn PRIVATE Threads::Threads
)
endif
()
if
(
MGE_WITH_CAMBRICON
)
target_link_libraries
(
megdnn PRIVATE
${
BANG_OBJS
}
${
MGE_CAMBRICON_LIBS
}
)
endif
()
install
(
TARGETS megdnn EXPORT
${
MGE_EXPORT_TARGETS
}
)
dnn/test/CMakeLists.txt
浏览文件 @
b59e8ccf
...
...
@@ -29,11 +29,6 @@ if(MGE_WITH_MIDOUT_PROFILE)
list
(
APPEND SOURCES
${
PROJECT_SOURCE_DIR
}
/third_party/midout/src/midout.cpp
)
endif
()
if
(
MGE_WITH_CAMBRICON
)
file
(
GLOB_RECURSE SOURCES_ cambricon/*.cpp
)
list
(
APPEND SOURCES
${
SOURCES_
}
)
endif
()
if
(
MGE_WITH_ATLAS
)
file
(
GLOB_RECURSE SOURCES_ atlas/*.cpp
)
list
(
APPEND SOURCES
${
SOURCES_
}
)
...
...
src/core/impl/comp_node_env.cpp
浏览文件 @
b59e8ccf
...
...
@@ -26,10 +26,6 @@
#include "megcore_rocm.h"
#endif
#if MGB_CAMBRICON
#include "megcore_cambricon.h"
#endif
#if MGB_ATLAS
#include "acl/acl.h"
#include "megcore_atlas.h"
...
...
@@ -81,10 +77,6 @@ MegDNNHandle::MegDNNHandle(const CompNodeEnv& env) {
#if MGB_CAMBRICON
if
(
env
.
property
().
type
==
CompNode
::
DeviceType
::
CAMBRICON
)
{
CompNodeEnv
::
CnrtEnv
::
init_status
.
init
();
megcore
::
createDeviceHandleWithGlobalInitStatus
(
&
m_dev_hdl
,
env
.
cnrt_env
().
device
,
0
,
true
);
megcore
::
createComputingHandleWithCambriconContext
(
&
m_comp_hdl
,
m_dev_hdl
,
0
,
{
env
.
cnrt_env
().
queue
});
init
=
true
;
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录