tqchen commented on PR #496: URL: https://github.com/apache/tvm-ffi/pull/496#issuecomment-3994265490
On the Tensor part, i think it is mainly a matter of consistency and our level of abstraction. Just that most of the underlying kernels likely still allows passing non-mut Tensor in and allow users to mut the data content I think this is somewhat like how File works in rust, e.g. the metadata of the File is protected by the rust safety rules, but writing to the file do not need the file to be mut, so the implicitly the side effect of writing to content is not part of the deal. So the case now is that the data content on GPU is not yet part of the safety part. This being said, I haven't seen a lot of rust based deep learning code for to reason about whether or not such relaxation is a good or bad thing. For consistency i feel we could first do clippy ignore and document the rationale. -- 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]
