Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 319ca901 authored by hhakim's avatar hhakim
Browse files

Minor fix in faust_torch: raise an exception if a MatGeneric to multiply is...

Minor fix in faust_torch: raise an exception if a MatGeneric to multiply is neither a MatSparse or MatDense.
parent f81d4dd3
Branches
Tags
No related merge requests found
...@@ -136,6 +136,8 @@ namespace Faust ...@@ -136,6 +136,8 @@ namespace Faust
convMatSparseToTensor(*spm, top, on_gpu?at::kCUDA:at::kCPU, clone, transpose); convMatSparseToTensor(*spm, top, on_gpu?at::kCUDA:at::kCPU, clone, transpose);
else if(dm = dynamic_cast<const Faust::MatDense<FPP,D>*>(op)) else if(dm = dynamic_cast<const Faust::MatDense<FPP,D>*>(op))
convMatDenseToTensor(*dm, top, on_gpu?at::kCUDA:at::kCPU, clone, transpose); convMatDenseToTensor(*dm, top, on_gpu?at::kCUDA:at::kCPU, clone, transpose);
else
throw std::runtime_error("Only MatSparse and MatDense conversions to tensor are handled.");
tres = tensor_chain_mul(tl, &top, on_gpu?at::kCUDA:at::kCPU, chain_opt, contiguous_dense_to_torch, transpose /* op_on_left if transpose */); tres = tensor_chain_mul(tl, &top, on_gpu?at::kCUDA:at::kCPU, chain_opt, contiguous_dense_to_torch, transpose /* op_on_left if transpose */);
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment