提交 2e63b45a authored 作者: Frederic's avatar Frederic

remove import/variable not used (and add a missing warnings imports).

上级 f27555e7
...@@ -756,7 +756,6 @@ def _check_viewmap(node, storage_map): ...@@ -756,7 +756,6 @@ def _check_viewmap(node, storage_map):
good_alias, bad_alias = {}, {} good_alias, bad_alias = {}, {}
outstorage = storage_map[onode][0] outstorage = storage_map[onode][0]
instorage_id = [id(storage_map[i][0]) for i in node.inputs]
# first find out which input it aliases # first find out which input it aliases
view_map = getattr(node.op, 'view_map', {}) view_map = getattr(node.op, 'view_map', {})
...@@ -868,8 +867,6 @@ def _find_bad_optimizations0(order, reasons, r_vals): ...@@ -868,8 +867,6 @@ def _find_bad_optimizations0(order, reasons, r_vals):
for i, node in enumerate(order): for i, node in enumerate(order):
for new_r in node.outputs: for new_r in node.outputs:
for reason, r, old_graph_str, new_graph_str in reasons[new_r]: for reason, r, old_graph_str, new_graph_str in reasons[new_r]:
problem = False
#check if the value for new_r doesn't match the value for r #check if the value for new_r doesn't match the value for r
new_r_val = r_vals[new_r] new_r_val = r_vals[new_r]
r_val = r_vals[r] r_val = r_vals[r]
...@@ -1552,7 +1549,6 @@ class _Linker(gof.link.LocalLinker): ...@@ -1552,7 +1549,6 @@ class _Linker(gof.link.LocalLinker):
# don't do this ugly hacky way of setting the # don't do this ugly hacky way of setting the
# filter_checks_isfinite # filter_checks_isfinite
from theano.tensor import TensorType # to set filter_check_isfinite from theano.tensor import TensorType # to set filter_check_isfinite
from theano import tests # for config.unittests.rseed
fgraph = self.fgraph fgraph = self.fgraph
input_storage_ = input_storage input_storage_ = input_storage
output_storage_ = output_storage output_storage_ = output_storage
...@@ -1706,8 +1702,6 @@ class _Linker(gof.link.LocalLinker): ...@@ -1706,8 +1702,6 @@ class _Linker(gof.link.LocalLinker):
if r.owner is None] if r.owner is None]
try: try:
equiv_vals = {}
problematic = set()
# r_vals are the true values associated with each # r_vals are the true values associated with each
# variable in the graph they should not change during # variable in the graph they should not change during
# the evaluation of this function, even when the graph # the evaluation of this function, even when the graph
...@@ -2265,7 +2259,6 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions ...@@ -2265,7 +2259,6 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
"default for a SymbolicInputKit.") "default for a SymbolicInputKit.")
input_storage.append(default.storage) input_storage.append(default.storage)
default = None default = None
required = False
elif isinstance(input, SymbolicInputKit): elif isinstance(input, SymbolicInputKit):
# If the input is a SymbolicInputKit, it represents more than # If the input is a SymbolicInputKit, it represents more than
# one storage unit. The indices and subinputs lists represent # one storage unit. The indices and subinputs lists represent
......
...@@ -9,6 +9,7 @@ import theano ...@@ -9,6 +9,7 @@ import theano
from theano import gof, Type, Apply from theano import gof, Type, Apply
from theano import tensor, scalar, config from theano import tensor, scalar, config
from theano.compat.six import StringIO from theano.compat.six import StringIO
from theano.gradient import grad_undefined
from theano.scalar import Scalar from theano.scalar import Scalar
scal = scalar # somewhere scalar gets reassigned to be a function scal = scalar # somewhere scalar gets reassigned to be a function
......
...@@ -7,15 +7,15 @@ that ndim is 0 as with all scalar type. ...@@ -7,15 +7,15 @@ that ndim is 0 as with all scalar type.
""" """
import copy, logging, sys import logging
import numpy import numpy
from theano.scalar.basic import upgrade_to_float_no_complex, complex_types from theano.scalar.basic import upgrade_to_float_no_complex, complex_types
from theano.scalar.basic_scipy import Erfinv from theano.scalar.basic_scipy import Erfinv
from theano.compat.six import StringIO from theano.compat.six import StringIO
from theano import Apply, Constant, Op, Type, Variable from theano import Apply
from theano import gof, scalar, tensor from theano import gof, scalar
_logger_name = 'theano.sandbox.cuda.elemwise' _logger_name = 'theano.sandbox.cuda.elemwise'
...@@ -430,7 +430,6 @@ class NaiveAlgo(object): ...@@ -430,7 +430,6 @@ class NaiveAlgo(object):
return sio.getvalue() return sio.getvalue()
def c_src_kernel_Ccontiguous(self, node, nodename): def c_src_kernel_Ccontiguous(self, node, nodename):
nd = node.outputs[0].type.ndim
sio = StringIO() sio = StringIO()
#print 'C_SRC_KERNEL', sio.getvalue() #print 'C_SRC_KERNEL', sio.getvalue()
......
import commands
import distutils import distutils
import logging import logging
import os import os
import re
import subprocess import subprocess
import sys import sys
import warnings import warnings
...@@ -245,7 +243,6 @@ class NVCC_compiler(object): ...@@ -245,7 +243,6 @@ class NVCC_compiler(object):
preargs = list(preargs) preargs = list(preargs)
if sys.platform != 'win32': if sys.platform != 'win32':
preargs.append('-fPIC') preargs.append('-fPIC')
no_opt = False
cuda_root = config.cuda.root cuda_root = config.cuda.root
#The include dirs gived by the user should have precedence over #The include dirs gived by the user should have precedence over
......
...@@ -2,6 +2,7 @@ import errno ...@@ -2,6 +2,7 @@ import errno
import logging import logging
import os import os
import sys import sys
import warnings
import numpy import numpy
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论