tflite-micro icon indicating copy to clipboard operation
tflite-micro copied to clipboard

Non-Unique Filenames in /tmp Directory Affecting microlite Compilation

Open cratajczak-EMM opened this issue 10 months ago • 0 comments

Hi fellow edge ML fans,

In the scripts below, some files are downloaded to the /tmp directory of the Linux machine with a fixed name defined in the script.

https://github.com/tensorflow/tflite-micro/blob/9b79b9faf208fddb509a0efc671bf338b5675ab9/tensorflow/lite/micro/tools/make/ext_libs/cmsis_download.sh#L51

https://github.com/tensorflow/tflite-micro/blob/9b79b9faf208fddb509a0efc671bf338b5675ab9/tensorflow/lite/micro/tools/make/ext_libs/cmsis_download.sh#L64

https://github.com/tensorflow/tflite-micro/blob/9b79b9faf208fddb509a0efc671bf338b5675ab9/tensorflow/lite/micro/tools/make/ext_libs/eyalroz_printf_download.sh#L50

https://github.com/tensorflow/tflite-micro/blob/9b79b9faf208fddb509a0efc671bf338b5675ab9/tensorflow/lite/micro/tools/make/ext_libs/cmsis_nn_download.sh#L41

This fixed name means the file name is not unique for each compilation. Once the loading is completed, the file is not deleted, leading to issues for any other user who intends to compile the microlite library on their side, since they don't have write access to these files. The files should be deleted at the end of the script or have a unique name per compilation.

While a human user can easily fix it with a sudo command, an Agent or Runner cannot.

Regards

Chris

cratajczak-EMM avatar Jan 27 '25 12:01 cratajczak-EMM