提交 d9ed1e2c authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Virgile Andreani

Fix typo amblibm -> amdlibm

上级 7a0175af
......@@ -355,7 +355,7 @@ import ``pytensor`` and print the config variable, as in:
When ``True``, ignore the first call to an PyTensor function while profiling.
.. attribute:: config.lib__amblibm
.. attribute:: config.lib__amdlibm
Bool value: either ``True`` or ``False``
......
......@@ -1566,26 +1566,26 @@ class ProfileStats:
printed_tip = True
# tip 2
if not config.lib__amblibm and any(
if not config.lib__amdlibm and any(
amdlibm_speed_up(a.op) for (fgraph, a) in self.apply_time
):
print(
" - Try installing amdlibm and set the PyTensor flag "
"lib__amblibm=True. This speeds up only some Elemwise "
"lib__amdlibm=True. This speeds up only some Elemwise "
"operation.",
file=file,
)
printed_tip = True
# tip 3
if not config.lib__amblibm and any(
if not config.lib__amdlibm and any(
exp_float32_op(a.op) and a.inputs[0].dtype == "float32"
for (fgraph, a) in self.apply_time
):
print(
" - With the default gcc libm, exp in float32 is slower "
"than in float64! Try PyTensor flag floatX=float64, or "
"install amdlibm and set the pytensor flags lib__amblibm=True",
"install amdlibm and set the pytensor flags lib__amdlibm=True",
file=file,
)
printed_tip = True
......
......@@ -547,7 +547,7 @@ def add_tensor_configvars():
# http://developer.amd.com/CPU/LIBRARIES/LIBM/Pages/default.aspx
config.add(
"lib__amblibm",
"lib__amdlibm",
"Use amd's amdlibm numerical library",
BoolParam(False),
# Added elsewhere in the c key only when needed.
......
......@@ -95,7 +95,7 @@ class PyTensorConfigParser:
compile__timeout: int
# add_tensor_configvars
tensor__cmp_sloppy: int
lib__amblibm: bool
lib__amdlibm: bool
tensor__insert_inplace_optimizer_validate_nb: int
# add_traceback_configvars
traceback__limit: int
......
......@@ -356,18 +356,18 @@ class ScalarType(CType, HasDataType, HasShape):
# we declare them here and they will be re-used by TensorType
l.append("<numpy/arrayobject.h>")
l.append("<numpy/arrayscalars.h>")
if config.lib__amblibm and c_compiler.supports_amdlibm:
if config.lib__amdlibm and c_compiler.supports_amdlibm:
l += ["<amdlibm.h>"]
return l
def c_libraries(self, c_compiler=None, **kwargs):
l = []
if config.lib__amblibm and c_compiler and c_compiler.supports_amdlibm:
if config.lib__amdlibm and c_compiler and c_compiler.supports_amdlibm:
l += ["amdlibm"]
return l
def c_compile_args(self, c_compiler=None, **kwargs):
if config.lib__amblibm and c_compiler and c_compiler.supports_amdlibm:
if config.lib__amdlibm and c_compiler and c_compiler.supports_amdlibm:
return ["-DREPLACE_WITH_AMDLIBM"]
else:
return []
......@@ -1245,7 +1245,7 @@ class UnaryScalarOp(ScalarOp):
def c_code_contiguous(self, node, name, inputs, outputs, sub):
(x,) = inputs
(z,) = outputs
if not config.lib__amblibm or node.inputs[0].type != node.outputs[0].type:
if not config.lib__amdlibm or node.inputs[0].type != node.outputs[0].type:
raise MethodNotDefined()
dtype = node.inputs[0].type.dtype_specs()[1]
......@@ -1260,7 +1260,7 @@ class UnaryScalarOp(ScalarOp):
"""
def c_code_contiguous_raw(self, dtype, n, i, o):
if not config.lib__amblibm:
if not config.lib__amdlibm:
raise MethodNotDefined()
if dtype.startswith("npy_"):
dtype = dtype[4:]
......@@ -2296,7 +2296,7 @@ class Pow(BinaryScalarOp):
def c_code_contiguous(self, node, name, inputs, outputs, sub):
(x, y) = inputs
(z,) = outputs
if not config.lib__amblibm:
if not config.lib__amdlibm:
raise MethodNotDefined()
# We compare the dtype AND the broadcast flag
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论