Skip to content

Missing LiteRtGetNumLayoutElements Symbol in Windows Prebuilt libliteRt.dll #6038

@HassanSaied

Description

@HassanSaied

Missing LiteRtGetNumLayoutElements Symbol in Windows Prebuilt libliteRt.dll
Description

The symbol LiteRtGetNumLayoutElements is missing from the prebuilt Windows libliteRt.dll, while it is present in the Linux and Android builds.

This causes linking failures when building against the Windows prebuilt binaries, particularly when using the litert_cc_sdk, where the symbol is referenced in litert_layout.h.

Affected Platform
Windows (prebuilt libliteRt.dll)

Impact
The missing symbol prevents successful linking of applications using the C++ SDK on Windows. Specifically, the function is used by NumElements() in litert_layout.h.

Code Reference

Below is the relevant snippet from litert_cc_sdk-src/litert/cc/litert_layout.h:

// Return the number of scalar elements in the provided tensor layout. Return
// an error if the layout includes dynamic dimensions.
Expected<size_t> NumElements() const {
  size_t num_elements;
  LITERT_RETURN_IF_ERROR(
      LiteRtGetNumLayoutElements(&lrt_layout_, &num_elements));
  return num_elements;
}

Because LiteRtGetNumLayoutElements is not exported in the Windows DLL, this results in an unresolved external symbol during linking.

Expected Behavior
LiteRtGetNumLayoutElements should be exported in the Windows prebuilt libliteRt.dll, consistent with the Linux and Android builds.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions