提交 9b0c950a authored 作者: AdeB's avatar AdeB

Remove unused imports

上级 325ce519
......@@ -23,8 +23,7 @@ from six import string_types, iteritems, itervalues
from six.moves import StringIO, xrange
from theano.gof import (graph, utils, link, ops_with_inner_function)
from theano.gof.link import raise_with_op
from theano.configparser import (config, AddConfigVar, BoolParam, IntParam,
StrParam)
from theano.configparser import (config, AddConfigVar, IntParam, StrParam)
from theano.compile.function_module import (
FunctionMaker, Function, infer_reuse_pattern,
SymbolicInputKit, SymbolicOutput, Supervisor, std_fgraph)
......
......@@ -10,7 +10,7 @@ import numpy
import theano
from theano import gof
import theano.gof.vm
from theano.configparser import config, AddConfigVar, StrParam
from theano.configparser import config
from theano.compile.ops import _output_guard
from six import string_types
......
......@@ -6,7 +6,7 @@ from six.moves import StringIO
import numpy as np
import theano
from theano.configparser import config, AddConfigVar, BoolParam, EnumStr
from theano.configparser import config
import theano.tensor as T
import theano.sandbox.cuda as cuda
from theano.compile import Mode
......
......@@ -11,7 +11,7 @@ from six import string_types, iteritems, itervalues
from theano.compile.mode import (Mode, register_mode,
predefined_modes, predefined_linkers,
predefined_optimizers)
from theano.configparser import config, AddConfigVar, IntParam, BoolParam
from theano.configparser import config
from theano.compile.function_module import FunctionMaker
from .profiling import ProfileStats
......
......@@ -1143,19 +1143,19 @@ AddConfigVar('scan.allow_output_prealloc',
BoolParam(True))
AddConfigVar('pycuda.init',
"""If True, always initialize PyCUDA when Theano want to
initilize the GPU. Currently, we must always initialize
PyCUDA before Theano do it. Setting this flag to True,
ensure that, but always import PyCUDA. It can be done
manually by importing theano.misc.pycuda_init before theano
initialize the GPU device.
""",
BoolParam(False),
in_c_key=False)
"""If True, always initialize PyCUDA when Theano want to
initilize the GPU. Currently, we must always initialize
PyCUDA before Theano do it. Setting this flag to True,
ensure that, but always import PyCUDA. It can be done
manually by importing theano.misc.pycuda_init before theano
initialize the GPU device.
""",
BoolParam(False),
in_c_key=False)
AddConfigVar('cublas.lib',
"""Name of the cuda blas library for the linker.""",
StrParam('cublas'))
"""Name of the cuda blas library for the linker.""",
StrParam('cublas'))
AddConfigVar('lib.cnmem',
"""Do we enable CNMeM or not (a faster CUDA memory allocator).
......@@ -1327,6 +1327,7 @@ AddConfigVar("compiledir_format",
StrParam(default_compiledir_format, allow_override=False),
in_c_key=False)
def default_compiledirname():
formatted = theano.config.compiledir_format % compiledir_format_dict
safe = re.sub("[\(\)\s,]+", "_", formatted)
......@@ -1417,6 +1418,7 @@ AddConfigVar(
allow_override=False),
in_c_key=False)
def default_compiledir():
return os.path.join(
theano.config.base_compiledir,
......@@ -1425,7 +1427,7 @@ def default_compiledir():
AddConfigVar(
'compiledir',
"platform-dependent cache directory for compiled modules",
ConfigParam(
default_compiledir,
filter=filter_compiledir,
......
......@@ -20,11 +20,6 @@ from theano.compat import izip
from six import string_types, reraise
from six.moves import StringIO, xrange
# Note that we need to do this before importing cutils, since when there is
# no theano cache dir initialized yet, importing cutils may require compilation
# of cutils_ext.
from theano.configparser import AddConfigVar, StrParam
# gof imports
from theano.gof import graph
from theano.gof import link
......
......@@ -34,8 +34,6 @@ from theano.misc.windows import (subprocess_Popen,
from theano.gof import compilelock
from theano.configdefaults import gcc_version_str, local_bitwidth
from theano.configparser import AddConfigVar, BoolParam
importlib = None
try:
import importlib
......
......@@ -10,7 +10,6 @@ import theano
from six import string_types, iteritems
from theano.configparser import config
from theano.gof.utils import flatten
from theano.misc.windows import output_subprocess_Popen
_logger = logging.getLogger("theano.gof.compiledir")
......
......@@ -12,7 +12,6 @@ from contextlib import contextmanager
import numpy as np
from theano import config
from theano.configparser import AddConfigVar, IntParam
random = np.random.RandomState([2015, 8, 2])
......
......@@ -2,13 +2,10 @@ from __future__ import print_function
import copy
import sys
import numpy
from theano.compat import DefaultOrderedDict
from theano.misc.ordered_set import OrderedSet
from six import StringIO
from theano.gof import opt
from theano.configparser import AddConfigVar, FloatParam
from theano import config
......
from theano.gof.compiledir import short_platform
from theano.configdefaults import short_platform
def test_short_platform():
......
......@@ -13,8 +13,7 @@ import sys
import time
import warnings
from theano.configparser import (config, AddConfigVar,
BoolParam, ConfigParam, _config_var_list)
from theano.configparser import (config, _config_var_list)
import theano.gof.cmodule
......
......@@ -14,7 +14,6 @@ import numpy
import theano
from theano import config, gof, printing, scalar
from theano.compat import imap
from theano.configparser import AddConfigVar, BoolParam
from theano.printing import pprint
from theano.tensor import basic as tensor
from theano.tensor import elemwise, opt, NotScalarConstantError
......
......@@ -1596,6 +1596,7 @@ local_elemwise_alloc = register_specialize(
local_elemwise_alloc_op(T.Elemwise, T.Alloc, T.DimShuffle)),
'local_alloc_elemwise')
@gof.local_optimizer([T.Elemwise])
def local_fill_sink(node):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论