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

Quick Test have some questions #17

Closed
liuxingyu123 opened this issue May 30, 2022 · 6 comments
Closed

Quick Test have some questions #17

liuxingyu123 opened this issue May 30, 2022 · 6 comments

Comments

@liuxingyu123
Copy link

`Setting up PyTorch plugin "bias_act_plugin"... Failed!
..\torch_utils\ops\bias_act.py:50: UserWarning: Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
File "..\torch_utils\ops\bias_act.py", line 48, in _init
_plugin = custom_ops.get_plugin('bias_act_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "..\torch_utils\custom_ops.py", line 64, in get_plugin
raise RuntimeError(f'Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "{file}".')
RuntimeError: Could not find MSVC/GCC/CLANG installation on this computer. Check _find_compiler_bindir() in "..\torch_utils\custom_ops.py".`
hello,I didn't download vs. what is the specific solution to this problem

@fenglinglwb
Copy link
Owner

If you were using Windows, please refer to RameenAbdal/StyleFlow#13.

@liuxingyu123
Copy link
Author

hello,The method you gave is very effective, but there is another problem。`Setting up PyTorch plugin "bias_act_plugin"... D:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\utils\cpp_extension.py:287: UserWarning: Error checking compiler version for cl: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte
warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error))
Failed!
D:\graduate_study\competition\electronics\wang\MAT-main\MAT-main\torch_utils\ops\bias_act.py:50: UserWarning: Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
File "D:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\utils\cpp_extension.py", line 1539, in _run_ninja_build
env=env)
File "D:\Anaconda3\envs\pytorch1_7\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\graduate_study\competition\electronics\wang\MAT-main\MAT-main\torch_utils\ops\bias_act.py", line 48, in init
plugin = custom_ops.get_plugin('bias_act_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "D:\graduate_study\competition\electronics\wang\MAT-main\MAT-main\torch_utils\custom_ops.py", line 112, in get_plugin
torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
File "D:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\utils\cpp_extension.py", line 997, in load
keep_intermediates=keep_intermediates)
File "D:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\utils\cpp_extension.py", line 1202, in jit_compile
with_cuda=with_cuda)
File "D:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\utils\cpp_extension.py", line 1300, in write_ninja_file_and_build_library
error_prefix="Error building extension '{}'".format(name))
File "D:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\utils\cpp_extension.py", line 1555, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'bias_act_plugin': [1/2] D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include\TH -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include\THC "-ID:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -ID:\Anaconda3\envs\pytorch1_7\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr -gencode=arch=compute_61,code=sm_61 --use_fast_math -c D:\graduate_study\competition\electronics\wang\MAT-main\MAT-main\torch_utils\ops\bias_act.cu -o bias_act.cuda.o
FAILED: bias_act.cuda.o
D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include\TH -ID:\Anaconda3\envs\pytorch1_7\lib\site-packages\torch\include\THC "-ID:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -ID:\Anaconda3\envs\pytorch1_7\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_61,code=sm_61 --use_fast_math -c D:\graduate_study\competition\electronics\wang\MAT-main\MAT-main\torch_utils\ops\bias_act.cu -o bias_act.cuda.o
ninja: build stopped: subcommand failed.`

@fenglinglwb
Copy link
Owner

fenglinglwb commented May 30, 2022

There is a solution. Just use Miniconda or Conda to first install python3.7 and then Pytorch as
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 tensorboard -c pytorch --yes
Finally, install the required libs. It works.

@liuxingyu123
Copy link
Author

thank you very much,it works .but My GPU performance is not very good. Do you have any solutions
RuntimeError: CUDA out of memory. Tried to allocate 180.00 MiB (GPU 0; 2.00 GiB total capacity; 964.18 MiB already allocated; 0 bytes free; 1.18 GiB reserved in total by PyTorch)

@fenglinglwb
Copy link
Owner

fenglinglwb commented May 31, 2022

I am sorry that the 2G memory of the GPU may not be sufficient for processing 512x512 images.

@liuxingyu123
Copy link
Author

fine,thank for your reply reply.

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