Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
320f66a6
提交
320f66a6
authored
6月 06, 2024
作者:
Virgile Andreani
提交者:
Virgile Andreani
7月 09, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused config options
上级
eaf05be6
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
0 行增加
和
182 行删除
+0
-182
config.rst
doc/library/config.rst
+0
-104
configdefaults.py
pytensor/configdefaults.py
+0
-65
configparser.py
pytensor/configparser.py
+0
-13
没有找到文件。
doc/library/config.rst
浏览文件 @
320f66a6
...
...
@@ -510,116 +510,12 @@ import ``pytensor`` and print the config variable, as in:
Removing these asserts can speed up execution.
.. attribute:: config.dnn__enabled
String value: ``'auto'``, ``'True'``, ``'False'``, ``'no_check'``
Default: ``'auto'``
If ``'auto'``, automatically detect and use
`cuDNN <https://developer.nvidia.com/cudnn>`_ when it is available.
If cuDNN is unavailable, do not raise an error.
If ``'True'``, require the use of cuDNN. If cuDNN is unavailable, raise an error.
If ``'False'``, neither use cuDNN nor check if it is available.
If ``'no_check'``, assume cuDNN is present and that the versions between the
header and library match.
.. attribute:: config.dnn__include_path
Default: ``include`` sub-folder in CUDA root directory, or headers paths defined for the compiler.
Location of the cuDNN header.
.. attribute:: config.dnn__library_path
Default: Library sub-folder (``lib64`` on Linux) in CUDA root directory, or
libraries paths defined for the compiler.
Location of the cuDNN library.
.. attribute:: config.conv__assert_shape
If ``True``, ``AbstractConv*`` :class:`Op`\s will verify that user-provided shapes
match the run-time shapes. This is a debugging option, and may slow down
compilation.
.. attribute:: config.dnn.conv.workmem
Deprecated, use :attr:`config.dnn__conv__algo_fwd`.
.. attribute:: config.dnn.conv.workmem_bwd
Deprecated, use :attr:`config.dnn__conv__algo_bwd_filter` and
:attr:`config.dnn__conv__algo_bwd_data` instead.
.. attribute:: config.dnn__conv__algo_fwd
String value:
``'small'``, ``'none'``, ``'large'``, ``'fft'``, ``'fft_tiling'``,
``'winograd'``, ``'winograd_non_fused'``, ``'guess_once'``, ``'guess_on_shape_change'``,
``'time_once'``, ``'time_on_shape_change'``.
Default: ``'small'``
3d convolution only support ``'none'``, ``'small'``, ``'fft_tiling'``, ``'guess_once'``,
``'guess_on_shape_change'``, ``'time_once'``, ``'time_on_shape_change'``.
.. attribute:: config.dnn.conv.algo_bwd
Deprecated, use :attr:`config.dnn__conv__algo_bwd_filter` and
:attr:`config.dnn__conv__algo_bwd_data` instead.
.. attribute:: config.dnn__conv__algo_bwd_filter
String value:
``'none'``, ``'deterministic'``, ``'fft'``, ``'small'``, ``'winograd_non_fused'``, ``'fft_tiling'``, ``'guess_once'``,
``'guess_on_shape_change'``, ``'time_once'``, ``'time_on_shape_change'``.
Default: ``'none'``
3d convolution only supports ``'none'``, ``'small'``, ``'guess_once'``,
``'guess_on_shape_change'``, ``'time_once'``, ``'time_on_shape_change'``.
.. attribute:: config.dnn__conv__algo_bwd_data
String value:
``'none'``, ``'deterministic'``, ``'fft'``, ``'fft_tiling'``, ``'winograd'``,
``'winograd_non_fused'``, ``'guess_once'``, ``'guess_on_shape_change'``, ``'time_once'``,
``'time_on_shape_change'``.
Default: ``'none'``
3d convolution only supports ``'none'``, ``'deterministic'``, ``'fft_tiling'``
``'guess_once'``, ``'guess_on_shape_change'``, ``'time_once'``,
``'time_on_shape_change'``.
.. attribute:: config.magma__enabled
String value: ``'True'``, ``'False'``
Default: ``'False'``
If ``'True'``, use `magma <http://icl.cs.utk.edu/magma/>`_ for matrix
computations.
If ``'False'``, disable magma.
.. attribute:: config.magma__include_path
Default: ``''``
Location of the magma headers.
.. attribute:: config.magma__library_path
Default: ``''``
Location of the magma library.
.. attribute:: config.ctc__root
Default: ``''``
...
...
pytensor/configdefaults.py
浏览文件 @
320f66a6
...
...
@@ -34,62 +34,6 @@ from pytensor.utils import (
_logger
=
logging
.
getLogger
(
"pytensor.configdefaults"
)
def
get_cuda_root
()
->
Path
|
None
:
# We look for the cuda path since we need headers from there
if
(
v
:
=
os
.
getenv
(
"CUDA_ROOT"
))
is
not
None
:
return
Path
(
v
)
if
(
v
:
=
os
.
getenv
(
"CUDA_PATH"
))
is
not
None
:
return
Path
(
v
)
if
(
s
:
=
os
.
getenv
(
"PATH"
))
is
None
:
return
Path
()
for
dir
in
s
.
split
(
os
.
pathsep
):
if
(
Path
(
dir
)
/
"nvcc"
)
.
exists
():
return
Path
(
dir
)
.
absolute
()
.
parent
return
None
def
default_cuda_include
()
->
Path
|
None
:
if
config
.
cuda__root
:
return
config
.
cuda__root
/
"include"
return
None
def
default_dnn_base_path
()
->
Path
|
None
:
# We want to default to the cuda root if cudnn is installed there
if
config
.
cuda__root
:
# The include doesn't change location between OS.
if
(
config
.
cuda__root
/
"include/cudnn.h"
)
.
exists
():
return
config
.
cuda__root
return
None
def
default_dnn_inc_path
()
->
Path
|
None
:
if
config
.
dnn__base_path
:
return
config
.
dnn__base_path
/
"include"
return
None
def
default_dnn_lib_path
()
->
Path
|
None
:
if
config
.
dnn__base_path
:
if
sys
.
platform
==
"win32"
:
path
=
config
.
dnn__base_path
/
"lib/x64"
elif
sys
.
platform
==
"darwin"
:
path
=
config
.
dnn__base_path
/
"lib"
else
:
# This is linux
path
=
config
.
dnn__base_path
/
"lib64"
return
path
return
None
def
default_dnn_bin_path
()
->
Path
|
None
:
if
config
.
dnn__base_path
:
if
sys
.
platform
==
"win32"
:
return
config
.
dnn__base_path
/
"bin"
return
config
.
dnn__library_path
return
None
def
_filter_mode
(
val
):
# Do not add FAST_RUN_NOGC to this list (nor any other ALL CAPS shortcut).
# The way to get FAST_RUN_NOGC is with the flag 'linker=c|py_nogc'.
...
...
@@ -607,15 +551,6 @@ def add_compile_configvars():
in_c_key
=
False
,
)
config
.
add
(
"ctc__root"
,
"Directory which contains the root of Baidu CTC library. It is assumed
\
that the compiled library is either inside the build, lib or lib64
\
subdirectory, and the header inside the include directory."
,
StrParam
(
""
,
mutable
=
False
),
in_c_key
=
False
,
)
def
_is_valid_cmp_sloppy
(
v
):
return
v
in
(
0
,
1
,
2
)
...
...
pytensor/configparser.py
浏览文件 @
320f66a6
...
...
@@ -74,12 +74,8 @@ class PyTensorConfigParser:
warn_float64
:
str
pickle_test_value
:
bool
cast_policy
:
str
deterministic
:
str
device
:
str
force_device
:
bool
conv__assert_shape
:
bool
print_global_stats
:
bool
assert_no_cpu_op
:
str
unpickle_function
:
bool
# add_compile_configvars
mode
:
str
...
...
@@ -90,7 +86,6 @@ class PyTensorConfigParser:
optimizer_verbose
:
bool
on_opt_error
:
str
nocleanup
:
bool
on_unused_import
:
str
gcc__cxxflags
:
str
cmodule__warn_no_version
:
bool
cmodule__remove_gxx_opt
:
bool
...
...
@@ -98,9 +93,7 @@ class PyTensorConfigParser:
cmodule__preload_cache
:
bool
cmodule__age_thresh_use
:
int
cmodule__debug
:
bool
compile__wait
:
int
compile__timeout
:
int
ctc__root
:
str
# add_tensor_configvars
tensor__cmp_sloppy
:
int
lib__amblibm
:
bool
...
...
@@ -151,8 +144,6 @@ class PyTensorConfigParser:
cycle_detection
:
str
check_stack_trace
:
str
metaopt__verbose
:
int
metaopt__optimizer_excluding
:
str
metaopt__optimizer_including
:
str
# add_vm_configvars
profile
:
bool
profile_optimizer
:
bool
...
...
@@ -175,10 +166,6 @@ class PyTensorConfigParser:
# add_blas_configvars
blas__ldflags
:
str
blas__check_openmp
:
bool
# add CUDA (?)
cuda__root
:
Path
|
None
dnn__base_path
:
Path
|
None
dnn__library_path
:
Path
|
None
def
__init__
(
self
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论