Skip to content

ZenDNN Shared Library undefined symbol ggml_get_type_traits_cpu #1404

@DaAwesomeP

Description

@DaAwesomeP

After building with ZenDNN I am seeing this error when trying to load the backend:

load_backend: failed to load libggml-zendnn.so: libggml-zendnn.so: undefined symbol: ggml_get_type_traits_cpu

I assume it is referring to these lines:

ggml_type const vec_dot_type = ggml_get_type_traits_cpu(src0->type)->vec_dot_type;
ggml_from_float_t const from_float = ggml_get_type_traits_cpu(vec_dot_type)->from_float;

Maybe this is related to being in a separate shared lib from ggml-cpu? The file does include gghml-cpu.h but isn't linked to any of the ggml-cpu shared libs (and can't because they're modules). I noticed that ggml-blas does not make use of the ggml_get_type_traits_cpu function, so it doesn't have the same issue.

Not sure what the best solution is here. The easy thing would be to move ggml_get_type_traits_cpu to ggml-base where any backend can access it.

My GGML options:

GGML_LTO ON
BUILD_SHARED_LIBS ON
GGML_BACKEND_DL ON
GGML_NATIVE OFF
GGML_CPU ON
GGML_CPU_ALL_VARIANTS ON
GGML_ZENDNN ON

cc @z-vishal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions