Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e6acc109
提交
e6acc109
authored
10月 25, 2017
作者:
Frédéric Bastien
提交者:
GitHub
10月 25, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6495 from abergeron/fix_mkl
Make sure MKL uses GNU OpenMP.
上级
b6e37683
4a1fd4cd
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
58 行增加
和
5 行删除
+58
-5
.appveyor.yml
.appveyor.yml
+1
-0
jenkins_buildbot_python2.sh
.jenkins/jenkins_buildbot_python2.sh
+1
-0
jenkins_buildbot_python2_32bit.sh
.jenkins/jenkins_buildbot_python2_32bit.sh
+3
-2
jenkins_buildbot_python2_debug.sh
.jenkins/jenkins_buildbot_python2_debug.sh
+1
-0
jenkins_buildbot_python3.sh
.jenkins/jenkins_buildbot_python3.sh
+3
-2
jenkins_buildbot_release_extra.sh
.jenkins/jenkins_buildbot_release_extra.sh
+1
-0
jenkins_pr_core.sh
.jenkins/jenkins_pr_core.sh
+3
-0
jenkins_pr_gpu.sh
.jenkins/jenkins_pr_gpu.sh
+2
-0
jenkins_pr_pretest.sh
.jenkins/jenkins_pr_pretest.sh
+2
-0
configdefaults.py
theano/configdefaults.py
+41
-1
没有找到文件。
.appveyor.yml
浏览文件 @
e6acc109
...
...
@@ -12,6 +12,7 @@ environment:
BINSTAR_TOKEN
:
secure
:
58KqJcKtfCBVCuIzpnkLm4XZLQqKq95Hs8Ly20HWaMSla67nusrp3y4sy6XzZOBQ
CONDA_LOC
:
"
C:
\\
Miniconda-x64"
MKL_THREADING_LAYER
:
GNU
install
:
# This breaks conda-build because of git
...
...
.jenkins/jenkins_buildbot_python2.sh
浏览文件 @
e6acc109
...
...
@@ -2,6 +2,7 @@
BUILDBOT_DIR
=
$WORKSPACE
/nightly_build
THEANO_PARAM
=
"theano --with-timer --timer-top-n 10"
export
MKL_THREADING_LAYER
=
GNU
export
THEANO_FLAGS
=
init_gpu_device
=
cuda
# CUDA
...
...
.jenkins/jenkins_buildbot_python2_32bit.sh
浏览文件 @
e6acc109
...
...
@@ -2,6 +2,8 @@
BUILDBOT_DIR
=
$WORKSPACE
/nightly_build
THEANO_PARAM
=
"theano --with-timer --timer-top-n 10"
export
MKL_THREADING_LAYER
=
GNU
# Set test reports using nosetests xunit
XUNIT
=
"--with-xunit --xunit-file="
SUITE
=
"--xunit-testsuite-name="
...
...
@@ -15,4 +17,4 @@ echo
FILE
=
${
BUILDBOT_DIR
}
/theano_python32bit_tests.xml
set
-x
NAME
=
python2_32bit
THEANO_FLAGS
=
device
=
cpu,force_device
=
true
,lib.amdlibm
=
False,compiledir
=
$HOME
/.theano/buildbot_theano_python2_32bit python bin/theano-nose
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
\ No newline at end of file
THEANO_FLAGS
=
device
=
cpu,force_device
=
true
,lib.amdlibm
=
False,compiledir
=
$HOME
/.theano/buildbot_theano_python2_32bit python bin/theano-nose
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
.jenkins/jenkins_buildbot_python2_debug.sh
浏览文件 @
e6acc109
...
...
@@ -2,6 +2,7 @@
BUILDBOT_DIR
=
$WORKSPACE
/nightly_build
THEANO_PARAM
=
"theano --with-timer --timer-top-n 10 -v"
export
MKL_THREADING_LAYER
=
GNU
export
THEANO_FLAGS
=
init_gpu_device
=
cuda
# CUDA
...
...
.jenkins/jenkins_buildbot_python3.sh
浏览文件 @
e6acc109
...
...
@@ -3,6 +3,8 @@
BUILDBOT_DIR
=
$WORKSPACE
/nightly_build
THEANO_PARAM
=
"theano --with-timer --timer-top-n 10"
COMPILEDIR
=
$HOME
/.theano/buildbot_theano_python3
export
MKL_THREADING_LAYER
=
GNU
# Set test reports using nosetests xunit
XUNIT
=
"--with-xunit --xunit-file="
SUITE
=
"--xunit-testsuite-name="
...
...
@@ -69,4 +71,4 @@ THEANO_FLAGS=$THEANO_FLAGS,compiledir=$COMPILEDIR,mode=FAST_COMPILE,warn.ignore_
# Fast run and float32
FILE
=
${
BUILDBOT_DIR
}
/theano_python3_fastrun_f32_tests.xml
NAME
=
python3_fastrun_f32
THEANO_FLAGS
=
$THEANO_FLAGS
,compiledir
=
$COMPILEDIR
,mode
=
FAST_RUN,warn.ignore_bug_before
=
all,on_opt_error
=
raise,on_shape_error
=
raise,magma.enabled
=
true
,floatX
=
float32 python3 bin/theano-nose
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
\ No newline at end of file
THEANO_FLAGS
=
$THEANO_FLAGS
,compiledir
=
$COMPILEDIR
,mode
=
FAST_RUN,warn.ignore_bug_before
=
all,on_opt_error
=
raise,on_shape_error
=
raise,magma.enabled
=
true
,floatX
=
float32 python3 bin/theano-nose
${
THEANO_PARAM
}
${
XUNIT
}${
FILE
}
${
SUITE
}${
NAME
}
.jenkins/jenkins_buildbot_release_extra.sh
浏览文件 @
e6acc109
...
...
@@ -2,6 +2,7 @@
BUILDBOT_DIR
=
$WORKSPACE
/nightly_build
THEANO_PARAM
=
"theano --with-timer --timer-top-n 10"
export
MKL_THREADING_LAYER
=
GNU
export
THEANO_FLAGS
=
init_gpu_device
=
cuda
# CUDA
...
...
.jenkins/jenkins_pr_core.sh
浏览文件 @
e6acc109
...
...
@@ -5,6 +5,9 @@
# Print commands as they are executed
set
-x
# To make MKL work
export
MKL_THREADING_LAYER
=
GNU
# Copy cache from master
BASECOMPILEDIR
=
$HOME
/.theano/pr_theano
rsync
-a
$HOME
/cache/
$HOME
/.theano/pr_theano
...
...
.jenkins/jenkins_pr_gpu.sh
浏览文件 @
e6acc109
...
...
@@ -5,6 +5,8 @@
# Print commands as they are executed
set
-x
export
MKL_THREADING_LAYER
=
GNU
# Copy cache from master
BASECOMPILEDIR
=
$HOME
/.theano/pr_theano
rsync
-a
$HOME
/cache/
$HOME
/.theano/pr_theano
...
...
.jenkins/jenkins_pr_pretest.sh
浏览文件 @
e6acc109
...
...
@@ -5,6 +5,8 @@
# Print commands as they are executed
set
-x
export
MKL_THREADING_LAYER
=
GNU
# Test flake8
echo
"===== Testing flake8"
bin/theano-nose theano/tests/test_flake8.py
--with-xunit
--xunit-file
=
theano_pre_tests.xml
||
exit
1
...
...
theano/configdefaults.py
浏览文件 @
e6acc109
...
...
@@ -1238,6 +1238,29 @@ AddConfigVar('cmodule.debug',
in_c_key
=
True
)
def
check_mkl_openmp
():
if
not
theano
.
config
.
blas
.
check_openmp
:
return
import
os
if
(
'MKL_THREADING_LAYER'
in
os
.
environ
and
os
.
environ
[
'MKL_THREADING_LAYER'
]
==
'GNU'
):
return
try
:
import
mkl
if
'2018'
in
mkl
.
get_version_string
():
raise
RuntimeError
(
'To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.'
)
except
ImportError
:
raise
RuntimeError
(
"""
Could not import 'mkl'. Either install mkl-service with conda or set
MKL_THREADING_LAYER=GNU in your environment for MKL 2018.
If you have MKL 2017 install and are not in a conda environment you
can set the Theano flag blas.check_openmp to False. Be warned that if
you set this flag and don't set the appropriate environment or make
sure you have the right version you *will* get wrong results.
"""
)
def
default_blas_ldflags
():
global
numpy
warn_record
=
[]
...
...
@@ -1366,16 +1389,22 @@ def default_blas_ldflags():
flags
=
[]
if
lib_path
:
flags
=
[
'-L
%
s'
%
lib_path
[
0
]]
if
'2018'
in
mkl
.
get_version_string
():
thr
=
'mkl_gnu_thread'
else
:
thr
=
'mkl_intel_thread'
flags
+=
[
'-l
%
s'
%
l
for
l
in
[
"mkl_core"
,
"mkl_intel_thread"
,
thr
,
"mkl_rt"
]]
res
=
try_blas_flag
(
flags
)
if
res
:
check_mkl_openmp
()
return
res
flags
.
extend
([
'-Wl,-rpath,'
+
l
for
l
in
blas_info
.
get
(
'library_dirs'
,
[])])
res
=
try_blas_flag
(
flags
)
if
res
:
check_mkl_openmp
()
maybe_add_to_os_environ_pathlist
(
'PATH'
,
lib_path
[
0
])
return
res
...
...
@@ -1396,6 +1425,8 @@ def default_blas_ldflags():
ret
.
extend
([
'-lm'
,
'-lm'
])
res
=
try_blas_flag
(
ret
)
if
res
:
if
'mkl'
in
res
:
check_mkl_openmp
()
return
res
# If we are using conda and can't reuse numpy blas, then doing
...
...
@@ -1411,6 +1442,8 @@ def default_blas_ldflags():
blas_info
.
get
(
'library_dirs'
,
[])])
res
=
try_blas_flag
(
ret
)
if
res
:
if
'mkl'
in
res
:
check_mkl_openmp
()
return
res
# Add sys.prefix/lib to the runtime search path. On
...
...
@@ -1421,6 +1454,8 @@ def default_blas_ldflags():
ret
.
append
(
'-Wl,-rpath,'
+
lib_path
)
res
=
try_blas_flag
(
ret
)
if
res
:
if
'mkl'
in
res
:
check_mkl_openmp
()
return
res
except
KeyError
:
...
...
@@ -1473,6 +1508,11 @@ AddConfigVar('blas.ldflags',
# Added elsewhere in the c key only when needed.
in_c_key
=
False
)
AddConfigVar
(
'blas.check_openmp'
,
"Check for openmp library conflict.
\n
WARNING: Setting this to False leaves you open to wrong results in blas-related operations."
,
BoolParam
(
True
),
in_c_key
=
False
)
AddConfigVar
(
'metaopt.verbose'
,
"0 for silent, 1 for only warnings, 2 for full output with"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论