Conversation
|
I think #2532 should probably fix this. I have tried to remove the reliance on any sort of path structure for where the core files are located, instead using the "elf_file" attribute in MLIR. #2532 passes tests, so if there is a test that tests this aspect of the XAIEV2 flow, then we should be robust to using any path. |
Are core files still generated? Since I call |
|
Yes, the files need to be generated since they contain the core's program memory (as per my understanding). What I meant by "fixed this" was meant in reply to Jeff's question, i.e. the ELF files could now be located elsewhere and the XAIEV2 lowering would still find them. All that's required is that the "elf_file=" attribute on the core is set. |
That makes sense, because I read it the other way :) I'm happy to wait until #2532 is merged, unless we really want core files to be generated in the cwd. |
4fca133 to
99bccab
Compare
b2b3010 to
19e0549
Compare
19e0549 to
60278f4
Compare
60278f4 to
711ebaf
Compare
711ebaf to
2b6ac7c
Compare
|
I'd merge main and rerun the CI. That might fix the failing tests by fixing the ELF file paths. Once it's all green, I see no reason not to merge this. |
|
Actually I see you already did merge main. I'd have a look at the generated MLIR and what the value of the elf file path is, and if those files actually exist. |
|
Is this PR also needed to make sure concurrent builds are correct? |
|
No, this is unrelated to that. |
|
How so? It looks like I am seeing the (ironenv) ➜ mlir-aie git:(muhaawad/process-safe-jit) ✗ ls -alth | grep .elf
-rwxrwxr-x 1 muhaawad muhaawad 2.5K Sep 30 17:37 main_core_0_2.elf
(ironenv) ➜ mlir-aie git:(muhaawad/process-safe-jit) ✗ rm *.elf
(ironenv) ➜ mlir-aie git:(muhaawad/process-safe-jit) ✗ pytest test/python/jit_compilation.py -sv
============================================== test session starts ===============================================
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0 -- /home/muhaawad/git/amd/iron/mlir-aie/ironenv/bin/python3
cachedir: .pytest_cache
rootdir: /home/muhaawad/git/amd/iron/mlir-aie
plugins: anyio-4.11.0
collected 3 items
test/python/jit_compilation.py::test_multiple_jit_compilations[int32-16] PASSED
test/python/jit_compilation.py::test_multiple_jit_compilations[int32-64] PASSED
test/python/jit_compilation.py::test_parallel_compilation_subprocess PASSED
=============================================== 3 passed in 1.75s ================================================
(ironenv) ➜ mlir-aie git:(muhaawad/process-safe-jit) ✗ ls -alth | grep .elf
-rwxrwxr-x 1 muhaawad muhaawad 2.5K Sep 30 17:37 main_core_0_2.elf
|
|
Yes, and each test runs in its own working directory. The other tests were failing because they put things in the home directory, the same home directory for all tests. That's at least my understanding. I think this was just a cleanup effort from Yiannis to make it possible to put these files inside the tmpdir created by aiecc.py. |
|
True but multiple tests will run inside the same working directory. E.g., here: mlir-aie/test/python/jit_extern_functions.py Lines 7 to 8 in 27da636 |
|
I was getting failures because the core files end up in the current working directory under parallel builds. I am manipulating the current working dir at my level to avoid that. |
|
Yeah, I can see the file also getting overwritten since it has a very standard name it seems. |
Shouldn't only one of those two lines run, since a machine will be either npu1 or npu2 but not both? Or is the working directory an NFS mount across npu1 and npu2 machines? If there are tests that run in the same working directory, I agree that will also cause issues. Edit: Just realized the linked file contains multiple tests that pytest runs. |
|
I'm hitting some core file related failures on IRONCLAD too which does parallel builds. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Coverage ReportCreated: 2025-10-08 15:05Click here for information about interpreting this report.
Generated by llvm-cov -- llvm version 18.1.3 |
|
@jgmelber it seems it's working without any workarounds to change the cwd in user code. |
Co-authored-by: Joseph Melber <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR fixes the path where core files should go. Before that,
tmpdirwas ignored for those.