gemini-code-assist[bot] commented on code in PR #19724:
URL: https://github.com/apache/tvm/pull/19724#discussion_r3391363419
##########
tests/python/disco/test_ccl.py:
##########
@@ -32,7 +32,10 @@
from tvm.script import relax as R
_all_session_kinds = [di.ThreadedSession, di.ProcessSession]
-_ccl = [get_global_func("runtime.disco.compiled_ccl")()]
+_compiled_ccl = get_global_func("runtime.disco.compiled_ccl",
allow_missing=True)
+if _compiled_ccl is None:
+ pytest.skip("Disco CCL is not enabled in this TVM build",
allow_module_level=True)
+_ccl = [_compiled_ccl()]
Review Comment:

The `runtime.disco.compiled_ccl` global function returns a list of compiled
CCL libraries (e.g., `["nccl"]`). Wrapping its return value in a list
(`[_compiled_ccl()]`) results in a nested list (e.g., `[["nccl"]]`). This
causes `pytest.mark.parametrize` to pass a list of strings instead of a string
to the test functions, which will fail the assertion in `sess.init_ccl`
expecting a string. We should assign `_ccl` directly to the return value of
`_compiled_ccl()`.
```suggestion
_ccl = _compiled_ccl()
```
--
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]