mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-02-06 15:10:20 +00:00
Add XNN Pack toggle switch for ONNX inference acceleration (#155)
* Initial plan * Add XNN Pack switch for ONNX inference acceleration Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com> * Refactor Rust ONNX session creation to reduce code duplication Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com>
This commit is contained in:
@@ -28,10 +28,9 @@ class S {
|
||||
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
|
||||
|
||||
static Future<S> load(Locale locale) {
|
||||
final name =
|
||||
(locale.countryCode?.isEmpty ?? false)
|
||||
? locale.languageCode
|
||||
: locale.toString();
|
||||
final name = (locale.countryCode?.isEmpty ?? false)
|
||||
? locale.languageCode
|
||||
: locale.toString();
|
||||
final localeName = Intl.canonicalizedLocale(name);
|
||||
return initializeMessages(localeName).then((_) {
|
||||
Intl.defaultLocale = localeName;
|
||||
@@ -6057,6 +6056,26 @@ class S {
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Use XNN to accelerate ONNX inference`
|
||||
String get settings_item_onnx_xnn_pack {
|
||||
return Intl.message(
|
||||
'Use XNN to accelerate ONNX inference',
|
||||
name: 'settings_item_onnx_xnn_pack',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Disabling this option may solve some compatibility issues`
|
||||
String get settings_item_onnx_xnn_pack_info {
|
||||
return Intl.message(
|
||||
'Disabling this option may solve some compatibility issues',
|
||||
name: 'settings_item_onnx_xnn_pack_info',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
||||
Reference in New Issue
Block a user