-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run things under both regular lua *and* yklua. #3
Conversation
.buildbot.sh
Outdated
# Set up yk. | ||
# | ||
# We don't yet use a cached ykllvm because at the time of writing we only cache | ||
# a release+assertions build and we don't want to benchmark assertions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a problem? We're not benchmarking the time it takes to build yklua are we? By the time the binary is built, and assertions in ykllvm are irrelevant I think, unless assertions are embedded in yklua?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. It's burnt into my head that we are using the LLVM API at runtime, but we are not!
OK, so should my next PR be to use the cached ykllvm? Part of me still wants to build it from scratch, but I don't feel strongly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine not to use a cached ykllvm here if you feel strongly about it, but let's nuke the comment either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've killed the comment in c030728
@@ -44,8 +44,12 @@ benchmark_suites: | |||
executors: | |||
Lua: | |||
executable: lua | |||
path: yklua/src/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be lua/src
or ...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yklua/src
is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, hang on: this means we're not benchmarking lua but yklua in two different configs. Note that "yklua without yk" will not, over time, be quite the same thing as "yk". Right now, if you don't #define USE_YK
you should end up (more-or-less) with the same binary, but I think that's not going to end up being viable when we start doing things like rewriting functions to expose elidable functions etc.
That suggests to me that we should build a "normal" Lua, from source, that's not derived directly from yklua.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would be unfair to not use the same source repo, but now I'm not so sure.
I was working under the assumption that all code we added to the lua source code is guarded with USE_YK
.
If that's not true we should indeed download a separate "no yk changes in sight" source tree and use that as a baseline.
Maybe we should just do that anyway for peace of mind. OK to do that in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was working under the assumption that all code we added to the lua source code is guarded with USE_YK.
It is right now (probably...) but I doubt that will be the case going forwards. [I'm actually unsure whether USE_YK
is massively useful even now... it does help a bit with reading the code, but you can always diff against "true Lua" to see the diffs, which is probably a better thing to do anway.]
If that's not true we should indeed download a separate "no yk changes in sight" source tree and use that as a baseline.
Maybe we should just do that anyway for peace of mind. OK to do that in another PR?
Yes and yes respectively.
Please squash. |
squashed. |
Looks like I messed up the rust install. Investigating. |
OK to squash? |
Please squash. |
We use the same exact source code for both, just one is built with JIT support, the other not.
Ready. |
Ah hah!
So I'm not losing my mind after all! ykjit/yk#1326 Do you want to retry? |
The
which is this code: jit_ir::Operand::Const(_) => {
// Since we are forcing constants into `ProxyConst`s during inlining, this
// case should never happen.
panic!()
} We should try this with |
This time it failed due to:
i.e. not memory corruption. We've seen this one before, but I was unable to find an issue. Will raise one. |
Issue here: Do we want to try this once more while I look into a lead @ltratt gave me this morning on why there could be memory corruption? |
Since properly disabling side-tracing I've had clean runs of these benchmarks (when running locally with try_repeat). I think there's a good chance this will merge if we retry. |
Back to trying to reproduce this locally then... |
@vext01 My guess is that this error is a "genuine" one that you can replicated with synchronised compilation, and probably reflects a genuine bug/limitation in trace_builder. |
I've managed to repro this locally. Will investigate. |
@ltratt with ykjit/yk#1369 merged, this should now succeed. (I've tested a previously failing benchmark now works locally) |
Uff
This PR will be my demise. |
With the memory corruption bug fixed, and with any luck, this may merge now. 🙏 |
We use the same exact source code for both, just one is built with JIT support, the other not.