onnxruntime
onnxruntime copied to clipboard
The EP_CTX_BLOB seems to have both WRITE and EXECUTABLE permissions enabled
Describe the issue
The EP_CTX_BLOB (The compiled model saved as an ONNX blob on the disk) seems to have WRITE and EXECUTABLE permissions enabled. Since a compiled blob is meant to be read from, I think only READ permissions are sufficient.
To reproduce
Use the following Session Configuration to save the EP context blob on the disk
sessionOptions.AddConfigEntry(kOrtSessionOptionEpContextEnable, "1");
Then check the permissions enabled on the saved file
Urgency
No response
Platform
Windows
OS Version
Windows 11
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
https://github.com/microsoft/onnxruntime/tree/rel-1.19.0
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
On Windows does it matter?
Hello IMHO it would be better not to have executable permissions (unless there is a reason) In Linux the same file does not seem to have executable permission. It comes as follows rw-rw-r--
On Linux it is controlled by umask. It depends on how the user setting was set. I think it should not be part of ONNX Runtime's logic. We should just rely on the operating system's default. Windows's permission model is quite different. I think executable permission bit is not very useful.
Applying stale label due to no activity in 30 days
Applying stale label due to no activity in 30 days