Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvcc fatal : Unsupported gpu architecture 'compute_30' #8

Closed
sekigh opened this issue Jun 29, 2021 · 7 comments
Closed

nvcc fatal : Unsupported gpu architecture 'compute_30' #8

sekigh opened this issue Jun 29, 2021 · 7 comments

Comments

@sekigh
Copy link

sekigh commented Jun 29, 2021

In parallel to #7 , I try to set up both sporco and sporco-cuda on the second machine by another way, saying commands

conda install sporco
pip install sporco-cuda

conda install sporco successfully install sporco but second command issues another problem saying:

nvcc fatal : Unsupported gpu architecture 'compute_30'

It looks cuda3 architecture should be removed from nvcc option. Could you tell how to detour this problem ?

My environment is:

ubuntu 18.04
python 3.7.4
cuda-11.2
gpu RX3090 (architecture 8.6)
docker 20.10.5

Full error message is as below:

(miniconda3-4.7.12) sekigh@779812fb3431:~$ pip install sporco-cuda
Collecting sporco-cuda
Using cached sporco-cuda-0.0.5.tar.gz (119 kB)
Requirement already satisfied: future in ./.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages (from sporco-cuda) (0.18.2)
Requirement already satisfied: numpy in ./.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages (from sporco-cuda) (1.19.2)
Building wheels for collected packages: sporco-cuda
Building wheel for sporco-cuda (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/sekigh/.pyenv/versions/miniconda3-4.7.12/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/setup.py'"'"'; file='"'"'/tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-k6hvhw7h
cwd: /tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/
Complete output (13 lines):
running bdist_wheel
running build
running build_ext
skipping 'sporco_cuda/util.c' Cython extension (up-to-date)
skipping 'sporco_cuda/cbpdn.c' Cython extension (up-to-date)
building 'sporco_cuda.util' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/sporco_cuda
creating build/temp.linux-x86_64-3.7/sporco_cuda/src
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/utils.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/utils.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -Xcompiler '-fPIC' 
nvcc fatal : Unsupported gpu architecture 'compute_30'
error: command '/usr/local/cuda-11.2/bin/nvcc' failed with exit status 1

ERROR: Failed building wheel for sporco-cuda
Running setup.py clean for sporco-cuda
Failed to build sporco-cuda
Installing collected packages: sporco-cuda
Running setup.py install for sporco-cuda ... error
ERROR: Command errored out with exit status 1:
command: /home/sekigh/.pyenv/versions/miniconda3-4.7.12/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/setup.py'"'"'; file='"'"'/tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-sybdeo_g/install-record.txt --single-version-externally-managed --compile --install-headers /home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m/sporco-cuda
cwd: /tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/
Complete output (19 lines):
running install
running build
running build_ext
cythoning sporco_cuda/util.pyx to sporco_cuda/util.c
/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/sporco_cuda/util.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
cythoning sporco_cuda/cbpdn.pyx to sporco_cuda/cbpdn.c
/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/sporco_cuda/cbpdn.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
warning: sporco_cuda/cbpdn.pyx:128:47: the result of using negative indices inside of code sections marked as 'wraparound=False' is undefined
warning: sporco_cuda/cbpdn.pyx:250:47: the result of using negative indices inside of code sections marked as 'wraparound=False' is undefined
building 'sporco_cuda.util' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/sporco_cuda
creating build/temp.linux-x86_64-3.7/sporco_cuda/src
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/utils.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/utils.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -Xcompiler '-fPIC'
nvcc fatal : Unsupported gpu architecture 'compute_30'
error: command '/usr/local/cuda-11.2/bin/nvcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/sekigh/.pyenv/versions/miniconda3-4.7.12/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/setup.py'"'"'; file='"'"'/tmp/pip-install-8ag8y8ks/sporco-cuda_b9aca92322af4e80b4d58c47b0bf8e3c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-sybdeo_g/install-record.txt --single-version-externally-managed --compile --install-headers /home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m/sporco-cuda Check the logs for full command output.
(miniconda3-4.7.12) sekigh@779812fb3431:~$

end of message

@bwohlberg
Copy link
Owner

I just pushed an update to setup.py that updates the cuda arch code assignments for different cuda versions. Could you please try to install from source downloaded from the repo to see if this resolves the problem for you?

@sekigh
Copy link
Author

sekigh commented Jun 30, 2021

After git pull, I tried a series of build/test/install. I ran build successfully but I faced error message on test;

(miniconda3-4.7.12) sekigh@779812fb3431:~/Windowsfolder/sporco-cuda$ python setup.py test
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'pytest'
(miniconda3-4.7.12) sekigh@779812fb3431:~/Windowsfolder/sporco-cuda$

I am confused and wonder if I need to install pytest prior to test, So I install pytest by conda install pytest. But I have the same error as the above.

@bwohlberg
Copy link
Owner

But at least the build succeeds now, whereas it failed before?

I suspect the error that you're seeing on running python setup.py test is because you don't have pytest or pytest-runner installed. Try doing
pip install pytest pytest-runner
If that doesn't work, run the tests with
pytest
instead of via setup.py.

@sekigh
Copy link
Author

sekigh commented Jun 30, 2021

Thank you for your quick response.
After I installed pytest-runner also, It started to run but issued several other error statements:

one is AssertionError under test_cbpdn.py: line 90

several depreciation warnings for su.rndmask(s.shape, frc, dtype=np.float32)

Full log statements are as follows:

(miniconda3-4.7.12) sekigh@779812fb3431:~/Windowsfolder/sporco-cuda$ python setup.py test
running pytest
running egg_info
creating sporco_cuda.egg-info
writing sporco_cuda.egg-info/PKG-INFO
writing dependency_links to sporco_cuda.egg-info/dependency_links.txt
writing requirements to sporco_cuda.egg-info/requires.txt
writing top-level names to sporco_cuda.egg-info/top_level.txt
writing manifest file 'sporco_cuda.egg-info/SOURCES.txt'
reading manifest file 'sporco_cuda.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
writing manifest file 'sporco_cuda.egg-info/SOURCES.txt'
running build_ext
skipping 'sporco_cuda/util.c' Cython extension (up-to-date)
skipping 'sporco_cuda/cbpdn.c' Cython extension (up-to-date)
building 'sporco_cuda.util' extension
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/utils.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/utils.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -Xcompiler '-fPIC'
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
gcc -pthread -B /home/sekigh/.pyenv/versions/miniconda3-4.7.12/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/util.c -o build/temp.linux-x86_64-3.7/sporco_cuda/util.o -shared -O2 -fno-strict-aliasing
gcc -pthread -shared -B /home/sekigh/.pyenv/versions/miniconda3-4.7.12/compiler_compat -L/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib -Wl,-rpath=/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/sporco_cuda/src/utils.o build/temp.linux-x86_64-3.7/sporco_cuda/util.o -L/usr/local/cuda-11.2/lib64 -Wl,-R/usr/local/cuda-11.2/lib64 -lcuda -lcudart -o /home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/util.cpython-37m-x86_64-linux-gnu.so
building 'sporco_cuda.cbpdn' extension
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/utils.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/utils.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -Xcompiler '-fPIC'
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/cbpdn_kernels.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/cbpdn_kernels.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -Xcompiler '-fPIC'
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/cbpdn.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/cbpdn.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -Xcompiler '-fPIC'
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/local/cuda-11.2/bin/nvcc -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/src/cbpdn_grd.cu -o build/temp.linux-x86_64-3.7/sporco_cuda/src/cbpdn_grd.o -Xcompiler '-D__builtin_stdarg_start=__builtin_va_start' --compiler-options '-fno-inline' --compiler-options '-fno-strict-aliasing' --compiler-options '-Wall' -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -Xcompiler '-fPIC'
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
gcc -pthread -B /home/sekigh/.pyenv/versions/miniconda3-4.7.12/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include -I/usr/local/cuda-11.2/include -Isporco_cuda/src -I/home/sekigh/.pyenv/versions/miniconda3-4.7.12/include/python3.7m -c sporco_cuda/cbpdn.c -o build/temp.linux-x86_64-3.7/sporco_cuda/cbpdn.o -shared -O2 -fno-strict-aliasing
In file included from /home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from sporco_cuda/cbpdn.c:610:
/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with "
^~~~~~~
gcc -pthread -shared -B /home/sekigh/.pyenv/versions/miniconda3-4.7.12/compiler_compat -L/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib -Wl,-rpath=/home/sekigh/.pyenv/versions/miniconda3-4.7.12/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/sporco_cuda/src/utils.o build/temp.linux-x86_64-3.7/sporco_cuda/src/cbpdn_kernels.o build/temp.linux-x86_64-3.7/sporco_cuda/src/cbpdn.o build/temp.linux-x86_64-3.7/sporco_cuda/src/cbpdn_grd.o build/temp.linux-x86_64-3.7/sporco_cuda/cbpdn.o -L/usr/local/cuda-11.2/lib64 -Wl,-R/usr/local/cuda-11.2/lib64 -lcuda -lcudart -lcufft -lcublas -lm -o /home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/cbpdn.cpython-37m-x86_64-linux-gnu.so
============================================================================================= test session starts ==============================================================================================
platform linux -- Python 3.7.4, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/sekigh/Windowsfolder/sporco-cuda, configfile: pytest.ini, testpaths: sporco_cuda
plugins: anyio-2.2.0
collected 18 items

sporco_cuda/tests/test_cbpdn.py ...F.......... [ 77%]
sporco_cuda/tests/test_util.py .... [100%]

=================================================================================================== FAILURES ===================================================================================================
______________________________________________________________________________________________ TestSet01.test_04 _______________________________________________________________________________________________

self = <test_cbpdn.TestSet01 object at 0x7f58dac38350>

def test_04(self):
    Nr = 32
    Nc = 31
    Nd = 5
    M = 4
    D = np.random.randn(Nd, Nd, M).astype(np.float32)
    s = np.random.randn(Nr, Nc).astype(np.float32)
    lmbda = 1e-1
    Wl1 = np.random.randn(Nr, Nc, M).astype(np.float32)
    opt = cbpdn.ConvBPDN.Options(
        {'Verbose': False, 'MaxMainIter': 50, 'L1Weight': Wl1,
         'AutoRho': {'Enabled': False}})
    b = cbpdn.ConvBPDN(D, s, lmbda, opt)
    X1 = b.solve()
    X2 = cucbpdn.cbpdn(D, s, lmbda, opt)
  assert(sm.mse(X1, X2) < 1e-10)

E assert 3.1156701478864617e-07 < 1e-10
E + where 3.1156701478864617e-07 = <function mse at 0x7f59054be4d0>(array([[[[[ 0. , 0. , 0. , 0.72999257]]],\n\n\n [[[-0.41066325, 0.46645844, -1.1764221 , ...-0. , -1.6124085 ]]],\n\n\n [[[ 0.2505663 , -0.95074236, 0.83143866, 1.0444186 ]]]]],\n dtype=float32), array([[[ 0. , 0. , 0. , 0.7299577 ],\n [-0.41064987, 0.46646753, -1.1764224 , 0.62749...576674, -0. , -1.612419 ],\n [ 0.25057182, -0.9507478 , 0.831419 , 1.0444106 ]]],\n dtype=float32))
E + where <function mse at 0x7f59054be4d0> = sm.mse

sporco_cuda/tests/test_cbpdn.py:90: AssertionError
=============================================================================================== warnings summary ===============================================================================================
sporco_cuda/tests/test_cbpdn.py::TestSet01::test_10
/home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/tests/test_cbpdn.py:202: DeprecationWarning: Function sporco.util.rndmask is deprecated; please use function sporco.signal.rndmask instead.
msk = su.rndmask(s.shape, frc, dtype=np.float32)

sporco_cuda/tests/test_cbpdn.py::TestSet01::test_11
/home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/tests/test_cbpdn.py:222: DeprecationWarning: Function sporco.util.rndmask is deprecated; please use function sporco.signal.rndmask instead.
msk = su.rndmask(s.shape, frc, dtype=np.float32)

sporco_cuda/tests/test_cbpdn.py::TestSet01::test_12
/home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/tests/test_cbpdn.py:253: DeprecationWarning: Function sporco.util.rndmask is deprecated; please use function sporco.signal.rndmask instead.
msk = su.rndmask(s.shape, frc, dtype=np.float32)

sporco_cuda/tests/test_cbpdn.py::TestSet01::test_13
/home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/tests/test_cbpdn.py:283: DeprecationWarning: Function sporco.util.rndmask is deprecated; please use function sporco.signal.rndmask instead.
msk = su.rndmask(s.shape, frc, dtype=np.float32)

sporco_cuda/tests/test_cbpdn.py::TestSet01::test_14
/home/sekigh/Windowsfolder/sporco-cuda/sporco_cuda/tests/test_cbpdn.py:324: DeprecationWarning: Function sporco.util.rndmask is deprecated; please use function sporco.signal.rndmask instead.
msk = su.rndmask(s.shape, frc, dtype=np.float32)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================================================================================== short test summary info ============================================================================================
FAILED sporco_cuda/tests/test_cbpdn.py::TestSet01::test_04 - assert 3.1156701478864617e-07 < 1e-10
=================================================================================== 1 failed, 17 passed, 5 warnings in 4.27s ===================================================================================
(miniconda3-4.7.12) sekigh@779812fb3431:~/Windowsfolder/sporco-cuda$

end of text

@bwohlberg
Copy link
Owner

Thanks for the log. The deprecation warnings are because sporco-cuda has yet to be updated for compatibility with the most recent release of sporco. The one test failure seems to be due to a poor choice of threshold in the test. My guess would be that you have a working version of sporco-cuda now.

@bwohlberg
Copy link
Owner

If you do a git pull to update your copy of the repo, the test warnings and failure should be resolved.

@sekigh
Copy link
Author

sekigh commented Jun 30, 2021

Thank you for your immediate fix. Yes, python setup.py test works fine without any errors and warnings. I tried following cuda-related scripts under sporco/examples/csc and sporco-cuda/examples and confirmed their working fine;

sporco/examples/csc:
cbpdn_cuda.py
cbpdn_grd_cuda.py

sporco-cuda/examples:
big_cbpdn.py
big_cbpdngrd.py
cmp_cbpdn.py
cmp_cbpdngrd.py
cmp_cbpdngrdmsk.py
cmp_cbpdnmsk.py
cuda_util.py
time_cbpdn.py

This is closed. I also would like to establish sporco-cuda environment on the first machine mentioned on #7. The cause looks different from this issue. I already tried out your updated setup.py on the first machine but failed in the same errors. I put that errors on #7.
Could you help solve that also ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants