Skip to content

Undefined symbols when installed with public PyTorch (C++11 ABI issue) #906

@borisfom

Description

@borisfom

Is TE supposed to automatically detect C++ ABI used by Torch ?
Or does it only work for Pytorch from NV container ?
I tried to pip install TE in environment with public Torch and ended up with undefined symbols in .so - clearly looking for non-c++11 ABI symbol :
E ImportError: /home/bfomitchev/.local/lib/python3.10/site-packages/transformer_engine_extensions.cpython-310-x86_64-lin
ux-gnu.so: undefined symbol: ZN18transformer_engine6getenvIiEET_RKSsRKS1
Now the symbols in installed .so looks like c++11:
bfomitchev@aiapps-040822:/tmp/nemo_build/TransformerEngine/tests/pytorch$ nm/home/bfomitchev/.local/lib/python3.10/site-packages/libtransformer_engine.so | grep getenv

00000000003756a0 T _ZN18transformer_engine6getenvIaEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

bfomitchev@aiapps-040822:/tmp/nemo_build/TransformerEngine/tests/pytorch$ pip show torch
Name: torch
Version: 2.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuildBuild system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions