116 VLOG(DRIVER) <<
"ArmnnDriver::getSupportedOperations()";
117 if (m_Device.get() ==
nullptr)
119 return NN_ERROR(ErrorStatus::DEVICE_UNAVAILABLE) <<
"Device Unavailable!";
122 std::stringstream ss;
123 ss <<
"ArmnnDriverImpl::getSupportedOperations()";
124 std::string fileName;
125 std::string timestamp;
126 if (!m_Device->m_Options.GetRequestInputsAndOutputsDumpDir().empty())
129 << m_Device->m_Options.GetRequestInputsAndOutputsDumpDir()
132 <<
"_getSupportedOperations.txt";
134 VLOG(DRIVER) << ss.str().c_str();
136 if (!m_Device->m_Options.GetRequestInputsAndOutputsDumpDir().empty())
139 std::ofstream fileStream;
140 fileStream.open(fileName, std::ofstream::out | std::ofstream::trunc);
141 if (fileStream.good())
143 fileStream << timestamp << std::endl;
144 fileStream << timestamp << std::endl;
149 std::vector<bool> result;
150 if (!m_Device->m_Runtime)
152 return NN_ERROR(ErrorStatus::DEVICE_UNAVAILABLE) <<
"Device Unavailable!";
156 if (
const auto result = validate(model); !result.ok())
158 return NN_ERROR(ErrorStatus::INVALID_ARGUMENT) <<
"Invalid Model!";
164 m_Device->m_Options.GetForcedUnsupportedOperations());
169 return NN_ERROR(ErrorStatus::GENERAL_FAILURE) <<
"Conversion Error!";
174 result.reserve(model.main.operations.size());
175 for (uint32_t operationIdx = 0; operationIdx < model.main.operations.size(); ++operationIdx)
177 bool operationSupported = modelConverter.IsOperationSupported(operationIdx);
178 result.push_back(operationSupported);