akaashrp commented on code in PR #20136:
URL: https://github.com/apache/tvm/pull/20136#discussion_r3860081035
##########
python/tvm/contrib/tvmjs.py:
##########
@@ -239,20 +243,32 @@ def dump_tensor_cache(
If the cache already exists, update the cache. When set to False, it
will overwrite the
existing files.
"""
- if encode_format not in ("raw", "f32-to-bf16"):
- raise ValueError(f"Invalie encode_format {encode_format}")
+ if isinstance(encode_format, str):
Review Comment:
I would prefer to keep the upfront validation. `resolve_encode_format` only
checks entries used by the current parameter set, and it runs while parameters
are being written. Additionally, the upfront pass rejects invalid unused
entries and fails before any shards are created.
--
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]