• notoraptor's avatar
    Update to fix python 3 error · 27f49908
    notoraptor 提交于
    Update test function test_pycuda_memory_to_theano() to fix Python 3 error.
    
    The refcount of a variable seems to be different between Python 2 and Python 3. So it seems better to stock an initial refcount in a variable and then do the checkings with that variable instead of directly using comparing to constant values.
    
    Tests passed with Python 3 (Anaconda):
    
    ```
    $ nosetests --verbose --nocapture theano/misc/tests/test_pycuda_theano_simple.py
    Run pycuda only example to test that pycuda works. ... ok
    Simple example with pycuda function and Theano CudaNdarray object. ... ok
    theano.misc.tests.test_pycuda_theano_simple.test_pycuda_memory_to_theano ... 4
    gpuarray ref count before creating a CudaNdarray 4
    strides (20, 5, 1)
    gpuarray ref count after creating a CudaNdarray 5
    gpuarray ref count after deleting the CudaNdarray 4
    ok
    
    ----------------------------------------------------------------------
    Ran 3 tests in 0.297s
    
    OK
    ```
    27f49908
名称
最后提交
最后更新
..
hooks 正在载入提交数据...
tests 正在载入提交数据...
__init__.py 正在载入提交数据...
buildbot_filter.py 正在载入提交数据...
check_blas.py 正在载入提交数据...
check_blas_many.sh 正在载入提交数据...
check_duplicate_key.py 正在载入提交数据...
check_multi_gpu.py 正在载入提交数据...
cpucount.py 正在载入提交数据...
cudamat_utils.py 正在载入提交数据...
do_nightly_build 正在载入提交数据...
do_nightly_build_send 正在载入提交数据...
doubleop.py 正在载入提交数据...
elemwise_openmp_speedup.py 正在载入提交数据...
elemwise_time_test.py 正在载入提交数据...
gh_api.py 正在载入提交数据...
gnumpy_utils.py 正在载入提交数据...
latence_gpu_transfert.py 正在载入提交数据...
may_share_memory.py 正在载入提交数据...
ordered_set.py 正在载入提交数据...
pkl_utils.py 正在载入提交数据...
pycuda_example.py 正在载入提交数据...
pycuda_init.py 正在载入提交数据...
pycuda_utils.py 正在载入提交数据...
safe_asarray.py 正在载入提交数据...
strutil.py 正在载入提交数据...
windows.py 正在载入提交数据...