mlir-aie
mlir-aie copied to clipboard
aiecc should change working directory when running chesscc
Currently chess runs in whatever working directory aiecc was invoked from, causing it to pollute that directory. Instead aiecc should change it's working directory to the tmpdir
before running chess, then copy any user outputs (elfs, xclbin, ...) to the appropriate place.
I suspect that chess leaves it's droppings in the same directory that the outputs appear in. So it might be better to not change the current directory, and just create temporary outputs in the tmpdir, then copy them where we want them. the key idea is to reduce the presence of unnecessary files in the file system.
I would suggest a unique directory per Chess invocation under tmpdir
otherwise we will fall into a race-condition nightmare.