[GPU] More friendly exception message (#10721)

* [GPU] More friendly exception message

* Apply Ilya's comment

Co-authored-by: Ilya Znamenskiy <ilya.znamenskiy@intel.com>

Co-authored-by: Ilya Znamenskiy <ilya.znamenskiy@intel.com>
This commit is contained in:
Mingyu Kim 2022-03-15 09:57:22 +09:00 committed by GitHub
parent 3b2b055bfd
commit 0b556fd7a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,7 +326,15 @@ cldnn::format find_format(dnnl::memory::desc desc, bool is_grouped) {
blk.inner_blks[0] == 16 && blk.inner_blks[1] == 4 && blk.inner_idxs[0] == 0 && blk.inner_idxs[1] == 1) {
return cldnn::format::os_is_yx_osv16_isv4;
} else {
throw std::runtime_error(std::string("Unsupported onednn dnnl::memory::desc find_format"));
std::stringstream msg;
msg << "Unsupported onednn dnnl::memory::desc find_format. "
<< "ndims: " << desc.data.ndims
<< ", inner_nblks: " << blk.inner_nblks
<< ", inner_blks: ";
for (int i = 0; i < blk.inner_nblks; i++)
msg << "(blk " << blk.inner_blks[i] << ", idx " << blk.inner_idxs[i] << ") ";
throw std::runtime_error(msg.str());
}
}
}