3473 Commits

Author SHA1 Message Date
Tommy Chiang
6fd753e657 Add LeakyRelu support to MTK compiler plugin
From [1], we can see LeakyRelu is supported by MTK NPU, and this is done by treating it as PRelu.
Hence, we can do the same thing in LiteRT and add it to the compiler plugin support list.

[1] https://chromium.googlesource.com/chromiumos/platform/tflite/+/refs/heads/main/delegate/mtk_neuron/neuron_delegate_kernel.cc#883

LiteRT-PiperOrigin-RevId: 853875388
2026-01-08 14:03:03 -08:00
Google AI Edge
69f98c7b66 Mark stablehlo.scatter and stablehlo.reduce_window as unsupported
This change updates the Google Tensor Compiler Plugin to mark `stablehlo.scatter` and `stablehlo.reduce_window` operations as unsupported. This prevents attempts to delegate these operations, allowing models containing them to run with these specific ops falling back to CPU execution.

LiteRT-PiperOrigin-RevId: 853698161
2026-01-08 05:38:12 -08:00
Google AI Edge
ee952d105b Modify the dumped model so that it's more like a regular TFLite model that simulates the corresponding DTS testcase.
PiperOrigin-RevId: 853561093
2026-01-07 22:30:08 -08:00
Google AI Edge
49a3d7f1c6 Update cmake build instructions to include the debugging build support
LiteRT-PiperOrigin-RevId: 853523245
2026-01-07 20:25:52 -08:00
Google AI Edge
08276903a2 Integrate the refactored litert_plugin_compiler in-place of compiler_api_wrapper artifacts.
LiteRT-PiperOrigin-RevId: 853489248
2026-01-07 18:24:11 -08:00
Terry Heo
ace5318762 Update litert_runtime_c_api_shared_lib to depends on proper dylib file
LiteRT-PiperOrigin-RevId: 853469560
2026-01-07 17:10:20 -08:00
Chun-nien Chan
5cd2ae9875 model-utils add quant dialect types
LiteRT-PiperOrigin-RevId: 853422737
2026-01-07 14:53:27 -08:00
Dillon Sharlet
5f7f029d39 Minor code size reduction for select and condition ops
This change makes the code size smaller than it was before adding float16 support for these ops.

PiperOrigin-RevId: 853370966
2026-01-07 12:37:08 -08:00
Copybara-Service
98abb02117 Merge pull request #3851 from graham0824:dev/weilhuan/tiny_gemma_mha_sha
LiteRT-PiperOrigin-RevId: 853363842
2026-01-07 12:16:11 -08:00
Andrew Zhang
7bc68785c7 Add an option to override MTK compilation option.
LiteRT-PiperOrigin-RevId: 853361282
2026-01-07 12:09:47 -08:00
Copybara-Service
1e665abd04 Merge pull request #4885 from graham0824:dev/chunhsue/custom_input
LiteRT-PiperOrigin-RevId: 853359859
2026-01-07 12:06:02 -08:00
Google AI Edge
b13d011c60 Google Tensor: refactor global state into dedicated module.
LiteRT-PiperOrigin-RevId: 853351609
2026-01-07 11:44:30 -08:00
Andrew Zhang
457dd511eb Use mmapped allocation of quantization params instead of creating new allocations and copies when mapping tflite quant params to litert quant params.
LiteRT-PiperOrigin-RevId: 853322458
2026-01-07 10:37:46 -08:00
Dillon Sharlet
fc38e63594 Add float16 support to EMBEDDING_LOOKUP
This CL also changes some existing use of `double` to `float`. This shouldn't change any results, because we never actually used double precision for more than a single op at a time.

PiperOrigin-RevId: 853320274
2026-01-07 10:31:47 -08:00
Google AI Edge
ac3320b28e Migrates builder.create<Op>() => Op::create()
LiteRT-Converter-PiperOrigin-RevId: 853319069
2026-01-07 10:28:19 -08:00
Dillon Sharlet
1260f2dfb7 Fix SELECT test on some compilers
PiperOrigin-RevId: 853317469
2026-01-07 10:24:58 -08:00
Terry Heo
7f4c2c7dee Update LiteRT C++ internal API doc in Doxygen style
LiteRT-PiperOrigin-RevId: 853299076
2026-01-07 09:40:39 -08:00
Dillon Sharlet
63806acb01 Add float16 support to comparison ops
PiperOrigin-RevId: 853073492
2026-01-06 21:52:31 -08:00
Dillon Sharlet
347c6741ab Add float16 support to SELECT ops
PiperOrigin-RevId: 853053904
2026-01-06 20:50:43 -08:00
Google AI Edge
ed48f22641 Update litert webgpu shared memory dependency
LiteRT-PiperOrigin-RevId: 853046419
2026-01-06 20:26:25 -08:00
Google AI Edge
ec93964d63 Refactor SELECT operator in preparation for porting to TFLM.
PiperOrigin-RevId: 853046297
2026-01-06 20:23:18 -08:00
Google AI Edge
cd6869cb77 Update tflite interpreter to respect the external weight buffer
PiperOrigin-RevId: 853013950
2026-01-06 18:28:58 -08:00
Andrew Zhang
82e1a71021 Sketch out vendor sdk compatibility API, add example vendor implementation.
Revision 1:
- General bugs fixes and add missing symbols.
- Change the order of calling LiteRtDispatchCheckRuntimeCompatibility() to appear after LiteRtDispatchInitialize. This allows vendor to reuse runtime context.
- Add mock api for all vendors.

LiteRT-PiperOrigin-RevId: 852996254
2026-01-06 17:21:09 -08:00
Google AI Edge
e11442fa5e Support cmake debug flavor build
Also fix mac os host build issues

LiteRT-PiperOrigin-RevId: 852989764
2026-01-06 16:58:13 -08:00
Byungchul Kim
d411f329bb Some minor cleanups like comments
LiteRT-PiperOrigin-RevId: 852957304
2026-01-06 15:23:19 -08:00
Google AI Edge
805c0e306b Fix docker breakge due to rename from .tf_configure.bazelrc to .litert_configure.bazelrc
LiteRT-PiperOrigin-RevId: 852953911
2026-01-06 15:14:10 -08:00
Chunlei Niu
ba80d53cf2 Qualcomm options parsing should not be inside GPU options check.
LiteRT-PiperOrigin-RevId: 852871115
2026-01-06 11:43:44 -08:00
Google AI Edge
ffffda2740 Update compiled model to always load the external buffer into host memory
Load external weights directly into GPU memory requires prepacking

LiteRT-PiperOrigin-RevId: 852812464
2026-01-06 09:29:10 -08:00
Steven Toribio
825d7d5a22 Add tfl.Pack in model utils.
LiteRT-PiperOrigin-RevId: 852792641
2026-01-06 08:36:08 -08:00
chunhsue-qti
237529b28f Qualcomm AI Engine Direct - Support custom input in npu_numerics_check.
Summary:
 - Add new flag, --input_dir, a folder storing all inputs.
 - Read inputs from input_dir by their signature names.
 - Add an example in README.md.
2026-01-06 18:05:19 +08:00
Google AI Edge
11220b2e0a Re-enable options testing with LITERT_WITH_EXTERNAL_WEIGHT_LOADER
LiteRT-PiperOrigin-RevId: 852625788
2026-01-05 23:30:16 -08:00
Google AI Edge
4139e62ec1 Automated Code Change
LiteRT-Converter-PiperOrigin-RevId: 852558553
2026-01-05 19:54:06 -08:00
Byungchul Kim
5590ba3ff0 Add GPU option to disable Vulkan shader compilation optimization.
LiteRT-PiperOrigin-RevId: 852504883
2026-01-05 16:41:11 -08:00
Jae H. Yoo
1145879bd1 Add QI2 to tfl.embedding_lookup
PiperOrigin-RevId: 852473501
2026-01-05 15:16:09 -08:00
Jae H. Yoo
59d7d3ad1e Add QI2 to tfl.embedding_lookup
LiteRT-Converter-PiperOrigin-RevId: 852473501
2026-01-05 15:11:10 -08:00
Majid Dadashi
f30d0a94f0 Add support for kTfLiteInt2 in TFLite FullyConnected hybrid kernels.
This change enables hybrid quantization for FullyConnected operations where the filter weights are in kTfLiteInt2 format. The kernel now unpacks the packed 2-bit integers into int8 for computation.

PiperOrigin-RevId: 852438439
2026-01-05 13:44:21 -08:00
Google AI Edge
4db33a8daf Migrates builder.create<Op>() => Op::create()
LiteRT-Converter-PiperOrigin-RevId: 852436299
2026-01-05 13:38:29 -08:00
Terry Heo
43406c82c8 Update LiteRT C++ Options API doc in Doxygen style
LiteRT-PiperOrigin-RevId: 852426900
2026-01-05 13:13:54 -08:00
Chunlei Niu
e91a213cf5 Add error handling for TensorBufferScopedLock creation in JNI.
LiteRT-PiperOrigin-RevId: 852419640
2026-01-05 12:55:35 -08:00
Ping Yu
b28179d6cb Integrate ProfileSummarizer into LiteRtProfiler.
LiteRT-PiperOrigin-RevId: 852383063
2026-01-05 11:23:30 -08:00
Google AI Edge
66dee2d929 Update build visibility for internal testing.
LiteRT-PiperOrigin-RevId: 852360292
2026-01-05 10:34:43 -08:00
Andrew Zhang
197d6ca925 Add python api to get tensor details from a signature.
LiteRT-PiperOrigin-RevId: 852353926
2026-01-05 10:20:01 -08:00
Tommy Chiang
c5d473d92e Internal change
LiteRT-PiperOrigin-RevId: 852337393
2026-01-05 09:41:47 -08:00
Google AI Edge
e69612b8af Initialize xnn before checking fingerprint.
PiperOrigin-RevId: 852287251
2026-01-05 07:10:38 -08:00
Terry Heo
f43eff4998 Update LiteRT C++ API comments
Moved a file comment to a class description.
Added missing comments.

LiteRT-PiperOrigin-RevId: 852031899
2026-01-04 14:13:45 -08:00
Google AI Edge
5537b9230d thrInvocationContextGetOutputBufferSyncFence now supports generating output fence for any edge in graph that is annotated with "request_fence".
LiteRT-PiperOrigin-RevId: 851429764
2026-01-02 13:24:12 -08:00
Alexander Shaposhnikov
95009b84b8 Bump XNNPACK version for open source builds.
PiperOrigin-RevId: 850573818
2025-12-30 19:10:38 -08:00
Byungchul Kim
5ef8b3c102 Internal changes only
LiteRT-PiperOrigin-RevId: 850239567
2025-12-29 20:12:24 -08:00
Google AI Edge
e2fb1c0fe0 Fix cmake host build error due to gcc warnings being treated as errors
LiteRT-PiperOrigin-RevId: 850147345
2025-12-29 13:35:33 -08:00
Copybara-Service
44713aa110 Merge pull request #5019 from fujunwei:level_zero_buffer_as_custom_buffer
LiteRT-PiperOrigin-RevId: 850137829
2025-12-29 12:59:14 -08:00