Troubleshooting
How to report a problem
Collecting error information of Optimium
InvalidUserArgumentsError
InvalidUserArgumentsError
If any argument in user_arguments.json
is mistyped or not appropriate for the target device, Optimium prints error with prefix "INVALID USER ARGUMENTS". In this case, please re-check user_arguments.json
in your working directory by following the printed error message.
Besides above InvalidUserArgumentsError
Errors beside above InvalidUserArgumentsError
For all errors except invalid user arguments, you will see a request for the report with error message.
In this case, please send us log files located in file path printed together with error message.([email protected]) We will do our best to respond as soon as possible.
Collecting error information of Optimium Runtime
Debug log is required to analyze why the error happened on Optimium Runtime.
To save debug log, please follow code below.
// please insert code below before creating Context.
rt::LogSettings::addWriter(rt::WriterOption::FileWriter("error-report.log"));
rt::LogSettings::setLogLevel(rt::LogLevel::Debug);
# please replace your code to below where Context is created.
context = rt.Context(verbosity=rt.LogLevel.Debug,
log_path="error-report.log")
// please replace your code to below where ContextFactory and Context are created.
val factory = ContextFactory()
val context = factory.verbosity(LogLevel.DEBUG).enableFileLog("error-report.log")
Once you insert above code snippet and run your application, error-report.log
file will be generated on your working directory. Please send the log file to us([email protected]).
If your application is terminated by signal (SIGILL, SIGSEGV, etc.), the log file named optimium-runtime-fatal-<process-id>.log
is also generated. Please send that log file too.
DeviceNotFoundError
DeviceNotFoundError
DeviceNotFoundError
(DeviceNotFoundException
in Kotlin) is occurred when Optimium Runtime can't find suitable device when loading a model.
1️⃣ Please check the component is installed. Components to use devices are listed below.
Native
:native
(liboptimium-runtime-native.so
)XNNPack
:xnnpack
(liboptimium-runtime-xnnpack.so
)
Library file is located at $HOME/.local/lib/<triple>
, /usr/local/lib/<triple>
(Linux) or /jni/<arch>
in your Android APK.
<triple>
can be one of:
x86_64-linux-gnu
aarch64-linux-gnu
x86_64-linux-android
aarch64-linux-android
2️⃣ (Native only) If libomp.so.5
or libomp.so
contains in the error message, please check libomp5
package is installed. Check here to install the package.
3️⃣ Please check whether your device is capable of running the model or not. It is possible that the model requires features that your device does not support or the model is optimized for other device (such as Trying to load a model for Arm64 on X64). To get information of your target device, please run code below.
import optimium.runtime as rt
ctx = rt.Context()
for dev in ctx.available_devices:
print(dev.name)
print(f"platform = {dev.platform}")
print(f"kind = {dev.kind}")
print(f"capability = {dev.capability}")
After running python code above, some texts are printed like this:
And check your user_arguments.json
file that is used when optimize the model contains any values that are not found in device information. If so, or mattr
is auto
, please re-run run_optimium.sh
for your device.
Updated 10 months ago