Unverified Commit 1b20f2d6 authored by Jinze Xue's avatar Jinze Xue Committed by GitHub
Browse files

Fix undefined symbol issue for transformer_engine::getenv (#763)


Signed-off-by: default avatarJinze Xue <jinzex@nvidia.com>
Co-authored-by: default avatarJinze Xue <jinzex@nvidia.com>
parent bfe21c3d
......@@ -445,6 +445,12 @@ def setup_pytorch_extension() -> setuptools.Extension:
sources = [
src_dir / "common.cu",
src_dir / "ts_fp8_op.cpp",
# We need to compile system.cpp because the pytorch extension uses
# transformer_engine::getenv. This is a workaround to avoid direct
# linking with libtransformer_engine.so, as the pre-built PyTorch
# wheel from conda or PyPI was not built with CXX11_ABI, and will
# cause undefined symbol issues.
root_path / "transformer_engine" / "common" / "util" / "system.cpp",
] + \
_all_files_in_dir(extensions_dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment