yaoyaoding commented on code in PR #213:
URL: https://github.com/apache/tvm-ffi/pull/213#discussion_r2483931656


##########
python/tvm_ffi/cpp/extension.py:
##########
@@ -360,7 +417,16 @@ def _decorate_with_tvm_ffi(source: str, functions: 
Mapping[str, str]) -> str:
     return "\n".join(sources)
 
 
-def build_inline(  # noqa: PLR0915, PLR0912
+def _str_seq2list(seq: Sequence[str] | str | None) -> list[str]:
+    if seq is None:
+        return []
+    elif isinstance(seq, str):
+        return [seq]
+    else:
+        return list(seq)
+
+
+def build_inline(

Review Comment:
   I see.
   
   We could hash the contents of the source code in `build_inline` to get a 
directory to store the source code like 
`<tvm-ffi-cache-root>/sources/<name>-<hash>`, and use the source files to call 
`build`. 



-- 
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]

Reply via email to