Lunderberg opened a new pull request, #14915:
URL: https://github.com/apache/tvm/pull/14915
Prior to this commit, the `TargetNode::host` could be specified in TVMScript
as part of the config dictionary, under the key `"host"`. However, this
required all other device parameters to be explicitly specified, rather than
using any of the short-hand string representations. This commit forwards the
`host` argument from TVMScript's `T.target` method to `tvm.target.Target`,
allowing both the device and host to be specified using the shorthand string
representation.
```python
@T.prim_func
def before_this_commit():
T.func_attr(
{
"target": T.target(
{
"arch": "sm_86",
"host": {"keys": ["cpu"], "kind": "llvm", "tag": ""},
"keys": ["cuda", "gpu"],
"kind": "cuda",
"max_num_threads": 1024,
"tag": "",
"thread_warp_size": 32,
}
)
}
)
T.evaluate(0)
@T.prim_func
def after_this_commit():
T.func_attr({"target": T.target("cuda", host="llvm")})
T.evaluate(0)
```
--
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]