yaoyaoding commented on code in PR #213:
URL: https://github.com/apache/tvm-ffi/pull/213#discussion_r2482396203
##########
python/tvm_ffi/cpp/load_inline.py:
##########
@@ -195,6 +206,52 @@ def _run_command_in_dev_prompt(
) from e
+def _resolve_linker(
+ with_cuda: bool,
+ build_dir: str,
+ cpp_files: Sequence[str] | None,
+ cuda_files: Sequence[str] | None,
+) -> tuple[list[str], list[str]]:
+ ninja: list[str] = []
+ link_files: list[str] = []
+ if cpp_files is None and cuda_files is None:
+ ninja.append(
+ "build main.o: compile {}".format(
+ str((Path(build_dir) / "main.cpp").resolve()).replace(":",
"$:")
+ )
+ )
+ link_files.append("main.o")
+ if with_cuda:
+ ninja.append(
+ "build cuda.o: compile_cuda {}".format(
+ str((Path(build_dir) / "cuda.cu").resolve()).replace(":",
"$:")
+ )
+ )
+ link_files.append("cuda.o")
Review Comment:
after refactor `build_inline`, this logic is not needed.
--
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]