Skip to content

Commit

Permalink
Merge pull request #7 from delallea/fix_assert_import
Browse files Browse the repository at this point in the history
A few typo fixes in doc
  • Loading branch information
nouiz committed Nov 1, 2011
2 parents 35574c5 + ff3003c commit 6ef3d96
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions theano/compile/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,20 @@ def register_OutputGuard_c_code(type):

class OutputGuard(gof.Op):
"""
This op is used only internaly by Theano.
This op is used only internally by Theano.
Only the AddDestroyHandler optimizer tries to insert them in the graph.
This Op is declared as destructive while is not destroying
This Op is declared as destructive while it is not destroying
anything. It returns a view. This is used to prevent destruction of
the output variable of a Theano function.
the output variables of a Theano function.
There is mechanism in Theano that should prevent this, but the use
of OutputGuard add a safe guard. Maybe it is currently possible
that optimization run before the add_destroy_handler phase that
make some inplace optimization bypass this mechanism?
There is a mechanism in Theano that should prevent this, but the use
of OutputGuard adds a safeguard: it may be possible for some optimization
run before the add_destroy_handler phase to bypass this mechanism, by
making in-place optimizations.
TODO: find a current full explaination.
TODO: find a current full explanation.
"""
destroy_map = {0:[0]}
view_map = {0:[0]}
Expand Down
4 changes: 2 additions & 2 deletions theano/sandbox/cuda/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ def c_compile_args(self):
return ret


# Register CudaNdarrayType to the OutputGuard list of know type
# to have OutputGuard generate c code for this type
# Register CudaNdarrayType to the OutputGuard list of known types
# to have OutputGuard generate C code for this type.
theano.compile.mode.register_OutputGuard_c_code(CudaNdarrayType)


Expand Down
4 changes: 2 additions & 2 deletions theano/sparse/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ def values_eq(self, a, b):
def is_valid_value(self, a):
return scipy.sparse.issparse(a) and (a.format == self.format)

# Register CudaNdarrayType to the OutputGuard list of know type
# to have OutputGuard generate c code for this type
# Register CudaNdarrayType to the OutputGuard list of known types
# to have OutputGuard generate C code for this type.
theano.compile.mode.register_OutputGuard_c_code(SparseType)


Expand Down
8 changes: 4 additions & 4 deletions theano/tensor/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,8 @@ def c_code_cache_version(self):
else:
return ()

# Register CudaNdarrayType to the OutputGuard list of know type
# to have OutputGuard generate c code for this type
# Register CudaNdarrayType to the OutputGuard list of known types
# to have OutputGuard generate C code for this type.
theano.compile.mode.register_OutputGuard_c_code(TensorType)

# Easy constructors
Expand Down Expand Up @@ -3467,8 +3467,8 @@ def c_code(self, node, name, inputs, outputs, sub): #DEBUG

def c_code_cache_version(self):
hv = self.helper_c_code_cache_version()
# If the helper_c_code_cache_version is not versionned
# We don't want to have a versioned version of this op c code
# If `helper_c_code_cache_version` is not versioned we do not want to
# have a versioned version of this op's C code.
if len(hv) == 0:
return ()
return (1, hv)
Expand Down
4 changes: 2 additions & 2 deletions theano/tensor/raw_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def values_eq(self, a, b):
return False
return True

# Register CudaNdarrayType to the OutputGuard list of know type
# to have OutputGuard generate c code for this type
# Register CudaNdarrayType to the OutputGuard list of known types
# to have OutputGuard generate C code for this type.
theano.compile.mode.register_OutputGuard_c_code(RandomStateType)

random_state_type = RandomStateType()
Expand Down

0 comments on commit 6ef3d96

Please sign in to comment.