Disable flang from pre-commit tests when Flang files are not touched

This post is to bring to the attention of the Flang community about a Pull Request ([CI] Disable flang from pre-commit tests when Flang files are not touched by rengolin · Pull Request #93485 · llvm/llvm-project · GitHub) to disable flang in pre-commit tests when Flang files are not touched. This would mean that changes to LLVM or MLIR will not cause a precommit test of Flang. There is still coverage with post-commit tests.

We need a plan of getting it back into these CI tests. Most importantly, what the criteria are for reinstating flang in the common CI tests.

I suppose the criterion is “when Flang builds stop running into OOM on Windows”.

That doesn’t happen every time even now. Is a week without OOM enough to say that it stopped?

1 Like

@kiranchandramohan Are we able to selectively disable on Windows the tests that cause problems? And then move those tests to post-commit?

Do we know if the problem on Windows is distinct to Windows or perhaps related to the available hardware resources?

1 Like

I agree with this, but then why should we change what we’re doing on Linux?

1 Like

The problem is building the frontend, some files are heavy to compile (heavy template?), so disabling tests won’t help with this particular issue I believe.
(the machine has 128GB RAM for 32 cores, which seems like a good ratio?)

I find it hard to quantify (and as a Clang contributor, I’m not really an interested party in this discussion), but the goal is to limit the frustration of contributors working on projects Flang depends on.

I believe the problem with tests is solved at this point. The current problem is that Flang compilation is failing due to OOM on Windows. I don’t remember reports of this happening on Linux.

I didn’t argue anywhere what should be happening with Flang builds that experience OOM. What I did was suggest which changes can be made to the script that generates the pipelines out of my recently acquired knowledge of that part of our codebase.

Some suggestions, like compiling Flang on Windows only when Flang sources are touched (which you seem to be pushing for), would require more surgery to the aforementioned script than others. Someone will have to do the legwork to implement that.

Early flang did have troubles on Linux build systems too. A few years ago, @klausler made a successful pass reducing the amount of memory used when building flang.

(Pardon me for being lazy) Is the Windows build using clang as the host compiler and/or VC++?

We’re using MSVC 19.29.30154.0, which corresponds to the latest release of Visual Studio 2019 according to Wikipedia.

1 Like

FYI, The following patch was merged that disables Flang from pre-commit tests on Windows when Flang files are not touched.

1 Like