tianrengao / SqueezeWave

Other
255 stars 50 forks source link

RuntimeError: expected type CUDAFloatType but got CUDAHalfType #3

Closed icewwn closed 4 years ago

icewwn commented 4 years ago

Epoch: 0 Traceback (most recent call last): File "/snap/pycharm-community/172/plugins/python-ce/helpers/pydev/pydevd.py", line 1434, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/snap/pycharm-community/172/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/mylinuxpc/git/SqueezeWave/train.py", line 204, in train(num_gpus, args.rank, args.group_name, train_config) File "/home/mylinuxpc/git/SqueezeWave/train.py", line 141, in train outputs = model((mel, audio)) File "/home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, *kwargs) File "/home/mylinuxpc/git/SqueezeWave/glow.py", line 234, in forward output = self.WN[k]((audio_0, spect)) File "/home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(input, kwargs) File "/home/mylinuxpc/git/SqueezeWave/glow.py", line 177, in forward n_channels_tensor) File "/home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) RuntimeError: expected type CUDAFloatType but got CUDAHalfType (compute_types at /pytorch/aten/src/ATen/native/TensorIterator.cpp:134) frame #0: std::function<std::string ()>::operator()() const + 0x11 (0x7f109e540fe1 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x2a (0x7f109e540dfa in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so) frame #2: at::TensorIterator::compute_types() + 0x36b (0x7f109efb2e6b in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libcaffe2.so) frame #3: at::TensorIterator::Builder::build() + 0x46 (0x7f109efb4b66 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libcaffe2.so) frame #4: at::TensorIterator::binary_op(at::Tensor&, at::Tensor const&, at::Tensor const&) + 0x2c4 (0x7f109efb54d4 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libcaffe2.so) frame #5: at::native::add_out(at::Tensor&, at::Tensor const&, at::Tensor const&, c10::Scalar) + 0x71 (0x7f109ee99b41 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libcaffe2.so) frame #6: at::native::add(at::Tensor const&, at::Tensor const&, c10::Scalar) + 0x32 (0x7f109ee99fb2 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libcaffe2.so) frame #7: at::TypeDefault::add(at::Tensor const&, at::Tensor const&, c10::Scalar) const + 0x70 (0x7f109f17a570 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libcaffe2.so) frame #8: torch::autograd::VariableType::add(at::Tensor const&, at::Tensor const&, c10::Scalar) const + 0x2c7 (0x7f109d081657 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1) frame #9: + 0x579b0b (0x7f109d1a3b0b in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1) frame #10: + 0x686176 (0x7f109d2b0176 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1) frame #11: torch::jit::InterpreterState::run(std::vector<c10::IValue, std::allocator >&) + 0x22 (0x7f109d2ab232 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1) frame #12: + 0x664d7c (0x7f109d28ed7c in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch.so.1) frame #13: + 0x3d3184 (0x7f10d8931184 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #14: + 0x3afb63 (0x7f10d890db63 in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #15: + 0x1172fc (0x7f10d86752fc in /home/mylinuxpc/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #16: _PyMethodDef_RawFastCallDict + 0x267 (0x56458fac1987 in /home/mylinuxpc/anaconda3/bin/python) frame #17: _PyCFunction_FastCallDict + 0x21 (0x56458fac1ae1 in /home/mylinuxpc/anaconda3/bin/python) frame #18: _PyObject_Call_Prepend + 0x63 (0x56458fab3c43 in /home/mylinuxpc/anaconda3/bin/python) frame #19: PyObject_Call + 0x6e (0x56458faa895e in /home/mylinuxpc/anaconda3/bin/python) frame #20: _PyEval_EvalFrameDefault + 0x1e20 (0x56458fb57250 in /home/mylinuxpc/anaconda3/bin/python) frame #21: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #22: _PyFunction_FastCallDict + 0x1d5 (0x56458fa9c5d5 in /home/mylinuxpc/anaconda3/bin/python) frame #23: _PyObject_Call_Prepend + 0x63 (0x56458fab3c43 in /home/mylinuxpc/anaconda3/bin/python) frame #24: + 0x17116a (0x56458faf616a in /home/mylinuxpc/anaconda3/bin/python) frame #25: _PyObject_FastCallKeywords + 0x49b (0x56458fafed2b in /home/mylinuxpc/anaconda3/bin/python) frame #26: _PyEval_EvalFrameDefault + 0x4bf6 (0x56458fb5a026 in /home/mylinuxpc/anaconda3/bin/python) frame #27: _PyFunction_FastCallDict + 0x10b (0x56458fa9c50b in /home/mylinuxpc/anaconda3/bin/python) frame #28: _PyObject_Call_Prepend + 0x63 (0x56458fab3c43 in /home/mylinuxpc/anaconda3/bin/python) frame #29: PyObject_Call + 0x6e (0x56458faa895e in /home/mylinuxpc/anaconda3/bin/python) frame #30: _PyEval_EvalFrameDefault + 0x1e20 (0x56458fb57250 in /home/mylinuxpc/anaconda3/bin/python) frame #31: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #32: _PyFunction_FastCallDict + 0x1d5 (0x56458fa9c5d5 in /home/mylinuxpc/anaconda3/bin/python) frame #33: _PyObject_Call_Prepend + 0x63 (0x56458fab3c43 in /home/mylinuxpc/anaconda3/bin/python) frame #34: + 0x17116a (0x56458faf616a in /home/mylinuxpc/anaconda3/bin/python) frame #35: _PyObject_FastCallKeywords + 0x49b (0x56458fafed2b in /home/mylinuxpc/anaconda3/bin/python) frame #36: _PyEval_EvalFrameDefault + 0x4bf6 (0x56458fb5a026 in /home/mylinuxpc/anaconda3/bin/python) frame #37: _PyFunction_FastCallDict + 0x10b (0x56458fa9c50b in /home/mylinuxpc/anaconda3/bin/python) frame #38: _PyObject_Call_Prepend + 0x63 (0x56458fab3c43 in /home/mylinuxpc/anaconda3/bin/python) frame #39: PyObject_Call + 0x6e (0x56458faa895e in /home/mylinuxpc/anaconda3/bin/python) frame #40: _PyEval_EvalFrameDefault + 0x1e20 (0x56458fb57250 in /home/mylinuxpc/anaconda3/bin/python) frame #41: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #42: _PyFunction_FastCallDict + 0x1d5 (0x56458fa9c5d5 in /home/mylinuxpc/anaconda3/bin/python) frame #43: _PyObject_Call_Prepend + 0x63 (0x56458fab3c43 in /home/mylinuxpc/anaconda3/bin/python) frame #44: + 0x17116a (0x56458faf616a in /home/mylinuxpc/anaconda3/bin/python) frame #45: _PyObject_FastCallKeywords + 0x49b (0x56458fafed2b in /home/mylinuxpc/anaconda3/bin/python) frame #46: _PyEval_EvalFrameDefault + 0x4bf6 (0x56458fb5a026 in /home/mylinuxpc/anaconda3/bin/python) frame #47: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #48: _PyFunction_FastCallDict + 0x400 (0x56458fa9c800 in /home/mylinuxpc/anaconda3/bin/python) frame #49: _PyEval_EvalFrameDefault + 0x1e20 (0x56458fb57250 in /home/mylinuxpc/anaconda3/bin/python) frame #50: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #51: PyEval_EvalCodeEx + 0x44 (0x56458fa9c3c4 in /home/mylinuxpc/anaconda3/bin/python) frame #52: PyEval_EvalCode + 0x1c (0x56458fa9c3ec in /home/mylinuxpc/anaconda3/bin/python) frame #53: + 0x1e004d (0x56458fb6504d in /home/mylinuxpc/anaconda3/bin/python) frame #54: _PyMethodDef_RawFastCallKeywords + 0xe9 (0x56458fafe569 in /home/mylinuxpc/anaconda3/bin/python) frame #55: _PyCFunction_FastCallKeywords + 0x21 (0x56458fafe801 in /home/mylinuxpc/anaconda3/bin/python) frame #56: _PyEval_EvalFrameDefault + 0x6258 (0x56458fb5b688 in /home/mylinuxpc/anaconda3/bin/python) frame #57: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #58: _PyFunction_FastCallKeywords + 0x325 (0x56458fafd9c5 in /home/mylinuxpc/anaconda3/bin/python) frame #59: _PyEval_EvalFrameDefault + 0x4aa9 (0x56458fb59ed9 in /home/mylinuxpc/anaconda3/bin/python) frame #60: _PyFunction_FastCallKeywords + 0xfb (0x56458fafd79b in /home/mylinuxpc/anaconda3/bin/python) frame #61: _PyEval_EvalFrameDefault + 0x6a0 (0x56458fb55ad0 in /home/mylinuxpc/anaconda3/bin/python) frame #62: _PyEval_EvalCodeWithName + 0x2f9 (0x56458fa9b4f9 in /home/mylinuxpc/anaconda3/bin/python) frame #63: _PyFunction_FastCallKeywords + 0x325 (0x56458fafd9c5 in /home/mylinuxpc/anaconda3/bin/python) : operation failed in interpreter: @torch.jit.script def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels): n_channels_int = n_channels[0] in_act = input_a+input_b


    t_act = torch.tanh(in_act[:, :n_channels_int, :])
    s_act = torch.sigmoid(in_act[:, n_channels_int:, :])
    acts = t_act * s_act
    return acts
icewwn commented 4 years ago

Solved by update GPU Driver