speed up vulkan dnn, and support ios and apple m1 chip. (#23349)

This commit is contained in:
Zihao Mu
2023-05-19 01:02:27 +08:00
committed by GitHub
parent 435ccfdd51
commit 5025f29378
117 changed files with 16867 additions and 9436 deletions

View File

@@ -32,7 +32,10 @@ std::string detail::NetImplBase::getDumpFileNameBase() const
Net::Impl::~Impl()
{
// nothing
#ifdef HAVE_VULKAN
if (context)
context->reset();
#endif
}
@@ -1538,10 +1541,14 @@ string Net::Impl::dump(bool forceAllocation) const
else
{
if (itBackend->second == prevNode)
skipId.push_back(idPrev);
{
if (idPrev != -1)
skipId.push_back(idPrev);
}
else if (!skipId.empty())
{
skipId.push_back(idPrev);
if (idPrev != -1)
skipId.push_back(idPrev);
std::sort(skipId.begin(), skipId.end());
for (int i = 0; i < skipId.size(); i++)
{