manupa-arm commented on pull request #7415: URL: https://github.com/apache/tvm/pull/7415#issuecomment-774627104
@areusch I think we can still call TVMNDArray_Load() with strm non-aligned. Its just that when de-referencing a pointer to non word-aligned location -- we should do it under memcpy so that it does what required based on the target architecture. Inside TVMNDArray_Load, I think data is already accessed via memcpy and its just some metadata such as shape are the ones directly de-referenced. Was that your concern ? I think this might trigger a compiler warning (-Wcast-align) and a runtime error in some platforms. Therefore, depending on whether this fix clears away all cast-align warnings, we might be able to use -Wcast-align=strict which makes the warning appear for x86 too, if we are using gcc 8 or higher. If this is the case, we might be able to create a failing compilation test case using build_static_runtime ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
