Skip to content

Commit 479c655

Browse files
Revert "Fix QNN_CONTEXT format mappings and ALOGD fallback for Genie integration"
This reverts commit c30b3cd.
1 parent c30b3cd commit 479c655

9 files changed

Lines changed: 3 additions & 14 deletions

File tree

examples/android/RunAnywhereAI/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ dependencies {
221221
implementation(project(":runanywhere-core-onnx")) // ~30MB - STT, TTS, VAD
222222
// RAG pipeline is now part of the core SDK (not a separate module)
223223
// Genie: closed-source AAR from private repo (or mavenLocal for dev)
224-
implementation("com.runanywhere.sdk:runanywhere-genie-android:0.2.0-SNAPSHOT")
224+
implementation("com.runanywhere.sdk:runanywhere-genie-android:0.1.5-SNAPSHOT")
225225

226226
// AndroidX Core & Lifecycle
227227
implementation(libs.androidx.core.ktx)

sdk/runanywhere-commons/src/features/llm/rac_llm_service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <android/log.h>
1818
#define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "RAC_LLM_SVC", __VA_ARGS__)
1919
#else
20-
#define ALOGD(...) do { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); } while(0)
20+
#define ALOGD(...) fprintf(stderr, __VA_ARGS__)
2121
#endif
2222

2323
#include "rac/core/rac_core.h"

sdk/runanywhere-commons/src/infrastructure/model_management/model_assignment.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ static std::vector<rac_model_info_t*> parse_models_json(const char* json_str, si
220220
model->format = RAC_MODEL_FORMAT_BIN;
221221
else if (format == "coreml" || format == "mlmodelc" || format == "mlpackage")
222222
model->format = RAC_MODEL_FORMAT_COREML;
223-
else if (format == "qnn_context" || format == "qnn")
224-
model->format = RAC_MODEL_FORMAT_QNN_CONTEXT;
225223
else
226224
model->format = RAC_MODEL_FORMAT_UNKNOWN;
227225

sdk/runanywhere-commons/src/infrastructure/model_management/model_types.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,6 @@ rac_bool_t rac_model_detect_framework_from_format(rac_model_format_t format,
403403
case RAC_MODEL_FORMAT_BIN:
404404
*out_framework = RAC_FRAMEWORK_FLUID_AUDIO;
405405
return RAC_TRUE;
406-
case RAC_MODEL_FORMAT_QNN_CONTEXT:
407-
*out_framework = RAC_FRAMEWORK_GENIE;
408-
return RAC_TRUE;
409406
default:
410407
return RAC_FALSE;
411408
}

sdk/runanywhere-commons/src/infrastructure/registry/service_registry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <android/log.h>
2424
#define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "RAC_SVC_REG", __VA_ARGS__)
2525
#else
26-
#define ALOGD(...) do { fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); } while(0)
26+
#define ALOGD(...) fprintf(stderr, __VA_ARGS__)
2727
#endif
2828

2929
#include "rac/core/rac_core.h"

sdk/runanywhere-kotlin/src/commonMain/kotlin/com/runanywhere/sdk/public/extensions/Models/ModelTypes.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ enum class ModelFormat(
4545
ORT("ort"),
4646
GGUF("gguf"),
4747
BIN("bin"),
48-
QNN_CONTEXT("qnn_context"),
4948
UNKNOWN("unknown"),
5049
}
5150

sdk/runanywhere-kotlin/src/jvmAndroidMain/kotlin/com/runanywhere/sdk/foundation/bridge/extensions/CppBridgeModelRegistry.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ object CppBridgeModelRegistry {
7979
const val ORT = 3 // RAC_MODEL_FORMAT_ORT
8080
const val BIN = 4 // RAC_MODEL_FORMAT_BIN
8181
const val COREML = 5 // RAC_MODEL_FORMAT_COREML
82-
const val QNN_CONTEXT = 5 // RAC_MODEL_FORMAT_QNN_CONTEXT (same C++ value; COREML is 4 in C++)
8382
const val TFLITE = 6 // RAC_MODEL_FORMAT_TFLITE
8483
}
8584

sdk/runanywhere-kotlin/src/jvmAndroidMain/kotlin/com/runanywhere/sdk/public/extensions/RunAnywhere+ModelManagement.jvmAndroid.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ internal actual fun registerModelInternal(modelInfo: ModelInfo) {
9292
ModelFormat.GGUF -> CppBridgeModelRegistry.ModelFormat.GGUF
9393
ModelFormat.ONNX -> CppBridgeModelRegistry.ModelFormat.ONNX
9494
ModelFormat.ORT -> CppBridgeModelRegistry.ModelFormat.ORT
95-
ModelFormat.QNN_CONTEXT -> CppBridgeModelRegistry.ModelFormat.QNN_CONTEXT
9695
else -> CppBridgeModelRegistry.ModelFormat.UNKNOWN
9796
},
9897
// CRITICAL: Map InferenceFramework to C++ framework constant
@@ -296,7 +295,6 @@ private fun bridgeModelToPublic(bridge: CppBridgeModelRegistry.ModelInfo): Model
296295
CppBridgeModelRegistry.ModelFormat.GGUF -> ModelFormat.GGUF
297296
CppBridgeModelRegistry.ModelFormat.ONNX -> ModelFormat.ONNX
298297
CppBridgeModelRegistry.ModelFormat.ORT -> ModelFormat.ORT
299-
CppBridgeModelRegistry.ModelFormat.QNN_CONTEXT -> ModelFormat.QNN_CONTEXT
300298
else -> ModelFormat.UNKNOWN
301299
},
302300
framework =
@@ -1348,7 +1346,6 @@ private fun parseModelAssignmentsJson(json: String): List<ModelInfo> {
13481346
1 -> ModelFormat.GGUF
13491347
2 -> ModelFormat.ONNX
13501348
3 -> ModelFormat.ORT
1351-
5 -> ModelFormat.QNN_CONTEXT
13521349
else -> ModelFormat.UNKNOWN
13531350
},
13541351
framework =

sdk/runanywhere-kotlin/src/jvmAndroidMain/kotlin/com/runanywhere/sdk/public/extensions/RunAnywhere+Storage.jvmAndroid.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ private fun convertToModelStorageMetrics(
231231
CppBridgeModelRegistry.ModelFormat.ONNX -> ModelFormat.ONNX
232232
CppBridgeModelRegistry.ModelFormat.ORT -> ModelFormat.ORT
233233
CppBridgeModelRegistry.ModelFormat.BIN -> ModelFormat.BIN
234-
CppBridgeModelRegistry.ModelFormat.QNN_CONTEXT -> ModelFormat.QNN_CONTEXT
235234
else -> ModelFormat.UNKNOWN
236235
}
237236

0 commit comments

Comments
 (0)