voidLitchi commented on code in PR #690:
URL: https://github.com/apache/tvm-ffi/pull/690#discussion_r3672566699
##########
python/tvm_ffi/utils/_build_optional_torch_c_dlpack.py:
##########
@@ -837,8 +865,21 @@ def main() -> None: # noqa: PLR0912, PLR0915
elif args.build_with_rocm:
cflags.extend(torch.utils.cpp_extension.COMMON_HIP_FLAGS)
cflags.append("-DBUILD_WITH_ROCM")
+ elif args.build_with_ascend:
+ cflags.append("-DBUILD_WITH_ASCEND")
include_paths.extend(get_torch_include_paths(args.build_with_cuda or
args.build_with_rocm))
+ # torch_npu ships headers and libraries under its own package
directory;
+ # add both include and lib paths so the linker can find libtorch_npu.
+ # Note: c10_npu symbols are compiled into libtorch_npu itself; there is
+ # no separate libc10_npu to link against.
+ if args.build_with_ascend:
Review Comment:
Updated to `build_with_torch_npu` in the same commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]