leandron commented on a change in pull request #8587:
URL: https://github.com/apache/tvm/pull/8587#discussion_r679744526



##########
File path: tests/python/unittest/test_target_target.py
##########
@@ -76,6 +76,14 @@ def test_target_string_parse():
     assert tvm.target.arm_cpu().device_name == "arm_cpu"
 
 
+def test_target_string_with_spaces():
+    target = tvm.target.Target(
+        "vulkan -device_name=Name\ of\ GPU\ with\ spaces -device_type=discrete"

Review comment:
       In tvmc we faced this challenge of having substrings within target(s) 
(see [relevant 
tests](https://github.com/apache/tvm/blob/81480287a891f07f3939b98cc57fad39e217f317/tests/python/driver/tvmc/test_tvmc_common.py#L268-L281)),
 one example is `llvm` arguments. The decision there was to go with nested 
quotes, similar to Python. Have you explored this possibility in here?
   
   That would make it look like:
   ```
   "vulkan -device_name='Name of GPU with spaces' -device_type=discrete"
   ```
   
   I feel that is looks a bit more natural to type in nested quotes rather than 
preceding everything with a backslash. Also, I think it would be aspirational 
to offer a similar experience (where possible), when using API and command line.
   
   What do you think?




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


Reply via email to