stan-dev / stanc3

The Stan transpiler (from Stan to C++ and beyond).
BSD 3-Clause "New" or "Revised" License
142 stars 46 forks source link

[FR] Running compile models tests for at O1? #1148

Closed SteveBronder closed 2 years ago

SteveBronder commented 2 years ago

I think it would be good to run the compilation tests at O1 as well to make sure we are catching everything (and because I think soon we want to make that the default) @rok-cesnovar do you think it would be okay to run them both at O0 and O1?

WardBrian commented 2 years ago

I think we can do this such that it only runs when test/integration/good/compiler-optimizations has had any changes to it? That way we don't need to do it on every CI run?

SteveBronder commented 2 years ago

Yeah imo that makes the most sense

WardBrian commented 2 years ago

@serban-nicusor-toptal Could you look into this next?

We'd want to duplicate the compile tests stages, but set STANCFLAGS += --O1 and only run them if the above folder has changed

rok-cesnovar commented 2 years ago

This: https://github.com/stan-dev/stanc3/blob/888ce27e62e0b8d5bcdda46f7d550a2cea4a7570/Jenkinsfile#L49

is the only thing we need to add for that test yeah.

serban-nicusor-toptal commented 2 years ago

I will have a PR ready later today for it.

WardBrian commented 2 years ago

Copying a discussion @rok-cesnovar and I had on slack, it would also be great to use https://github.com/stan-dev/performance-tests-cmdstan/blob/master/compare-compilers.sh to compare that the same results are achieved on the set of models we have golds for there.

We will need to slightly modify that script, since we need to run compare-compilers but the second compiler is the same one just with --O1 set