提交 a73afb69 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed some typos from recent commits

上级 bb269609
......@@ -2,11 +2,11 @@
Since 0.5rc2
* Fix a memory leak with shared variable(we kept a pointor to the original value)
* The key in our cache now store the hash of constant and not the constant value itself. This is significat for big constant.
* theano-cache list list key file bigger then 1M
* theano-cache list print an histograme of the number of key per compiled module
* theano-cache list print the number of compiled module per op class
* Fixed a memory leak with shared variable (we kept a pointer to the original value)
* The keys in our cache now store the hash of constants and not the constant values themselves. This is significantly more efficient for big constant arrays.
* 'theano-cache list' lists key files bigger than 1M
* 'theano-cache list' prints an histogram of the number of keys per compiled module
* 'theano-cache list' prints the number of compiled modules per op class
=============
Release Notes
......
......@@ -39,6 +39,6 @@ else:
print 'Type "theano-cache clear" to erase the cache'
print 'Type "theano-cache list" to print the cache content'
print 'Type "theano-cache unlock" to unlock the cache directory'
print 'Type "theano-cache cleanup" to delete old key format'
print 'Type "theano-cache cleanup" to delete keys in the old format'
sys.exit(1)
.. _NEWS:
Since 0.5rc2
* Fixed a memory leak with shared variable (we kept a pointer to the original value)
* The keys in our cache now store the hash of constants and not the constant values themselves. This is significantly more efficient for big constant arrays.
* 'theano-cache list' lists key files bigger than 1M
* 'theano-cache list' prints an histogram of the number of keys per compiled module
* 'theano-cache list' prints the number of compiled modules per op class
=============
Release Notes
=============
......
......@@ -84,7 +84,7 @@ Benjamin J. McCann provides `installation documentation <http://www.benmccann.co
Gentoo
~~~~~~
Brian Vandenberg emailed `installation instruction on Gentoo <https://groups.google.com/d/msg/theano-dev/-8WCMn2FMR0/bJPasoZXaqoJ>`.
Brian Vandenberg emailed `installation instructions on Gentoo <http://groups.google.com/d/msg/theano-dev/-8WCMn2FMR0/bJPasoZXaqoJ>`.
.. _linux_basic:
......
......@@ -906,11 +906,12 @@ class CLinker(link.Linker):
if isinstance(i, graph.Constant): #orphans
if id(i) not in constant_ids:
isig = (i.signature(), topological_pos, i_idx)
# If the Theano constant provide a strong hash
# If the Theano constant provides a strong hash
# (no collision for transpose, 2, 1, 0, -1, -2,
# 2 element swapped...) we put this hash in the signature
# instead of the value. This make the key file much smaller
# for big constant. Before this, we saw key file up to 80M.
# instead of the value. This makes the key file much
# smaller for big constant arrays. Before this, we saw key
# files up to 80M.
if hasattr(isig[0], "theano_hash"):
isig = (isig[0].theano_hash(), topological_pos, i_idx)
try:
......
......@@ -120,10 +120,11 @@ def flatten(a):
def cleanup():
""" Delete old keys from the compiledir
"""
Delete keys in old format from the compiledir.
We define old key as key that have an ndarray in them.
Now we use an hash in the keys of the constant data.
We define keys in old format as keys that have an ndarray in them.
Now we use a hash in the keys of the constant data.
If there is no key left for a compiled module, we delete the module.
"""
......@@ -144,7 +145,6 @@ def cleanup():
break
if len(keydata.keys) == 0:
shutil.rmtree(os.path.join(compiledir, directory))
pass
except EOFError:
print ("ERROR while reading this key file '%s'."
......
......@@ -2,17 +2,17 @@ from theano.gof.cc import hash_from_code
def hash_from_sparse(data):
# We need to hash the shapes as hash_from_code only hash
# We need to hash the shapes as hash_from_code only hashes
# the data buffer. Otherwise, this will cause problem with shapes like:
# (1, 0) and (2, 0)
# We also need to add the dtype to make the distinction between
# uint32 and int32 of zeros with the same shape.
# python hash are not strong, so I always use md5. To don't have a too long
# hash, I call it again on the contatenation of all part.
return (hash_from_code(hash_from_code(data.data) +
# Python hash is not strong, so I always use md5. To avoid having a too
# long hash, I call it again on the contatenation of all parts.
return hash_from_code(hash_from_code(data.data) +
hash_from_code(data.indices) +
hash_from_code(data.indptr) +
hash_from_code(str(data.shape)) +
hash_from_code(str(data.dtype)) +
hash_from_code(data.format)))
hash_from_code(data.format))
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论