Skip to content
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

WIP: separate julia compile stages #16059

Closed
wants to merge 1 commit into from
Closed

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 26, 2016

due to recent changes / improvements to how julia handles sysimg generation, there's no longer an advantage to doing all of these operations in one step. and due to the amount of memory required for compiling .o, it could actually be a disadvantage if the host starts swapping from trying to make sys.o and sys-debug.o simultaneously.

this saves a bit of replaced code from getting put in the system image
and allows us to serialize the .o file emission while keeping
the rest of the build parallel

this isn't essential on systems with sufficient memory,
but CI is typically sufficiently constrained that this is highly beneficial

(marked WIP since I'm still investigating whether there are other tweaks that might make CI happier, etc)

@yuyichao
Copy link
Contributor

and allows us to serialize the .o file emission while keeping the rest of the build parallel

Is the default build still run the *.o generation in parallel?

@vtjnash
Copy link
Member Author

vtjnash commented Apr 26, 2016

Is the default build still run the *.o generation in parallel?

yes. it requires calling make twice to get parallel everywhere else but not on this step

@yuyichao
Copy link
Contributor

it requires calling make twice to get parallel everywhere else but not on this step

Can't this already be achieved with make julia-ui-release julia-ui-debug -jn; make -j1?

@vtjnash
Copy link
Member Author

vtjnash commented Apr 26, 2016

yes, but this does a bit more in parallel so it can be faster :)

@vtjnash vtjnash force-pushed the jn/opt-makefile-compile branch 2 times, most recently from c6a6535 to 70c8958 Compare April 27, 2016 00:45
@@ -103,8 +107,6 @@ script:
done;
fi
- cd .. && mv julia julia2
- cp /tmp/julia/lib/julia/sys.ji local.ji && /tmp/julia/bin/julia -J local.ji -e 'true' &&
/tmp/julia/bin/julia-debug -J local.ji -e 'true' && rm local.ji
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep this as discussed in the rebased-out commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Even if slightly redundant I don't see much benefit in removing this test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't actually want to be installing sys.ji (which is a build intermediate). otoh, this command is now being run as part of bootstrapping, so it should be redundant to run it again as part of the tests

this test, added by e92fc78, was obsoleted by f0712f0 which removed the code path that this was supposed to test (4776757#commitcomment-9240188)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point that we probably don't want it in the average install. So we can change this test to run in the build tree. This functionality is still valuable for anyone who wants to run from a custom image but does not have a linker available, so we should continue testing it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality is still valuable for anyone....

sadly true. this PR is actually starting to test some ideas i have for fixing that. there's no solid reason we can't emit a better incremental build. that's probably a prereq for #5155 anyhow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also no reason we couldn't try to build and ship lld. It might not be fully functional yet in ld-mode on Windows, but link.exe mode should mostly work now AIUI.

this saves a bit of replaced code from getting put in the system image
and allows us to serialize the .o file emission while keeping
the rest of the build parallel

this isn't essential on systems with sufficient memory,
but CI is typically sufficiently constrained that this is highly beneficial
@vtjnash vtjnash force-pushed the jn/opt-makefile-compile branch from 70c8958 to 380d66b Compare April 29, 2016 20:18
@kshyatt kshyatt added performance Must go faster building Build system, or building Julia or its dependencies labels May 9, 2016
@vtjnash vtjnash mentioned this pull request Jun 29, 2016
@vtjnash vtjnash closed this Feb 12, 2017
@vtjnash vtjnash deleted the jn/opt-makefile-compile branch February 12, 2017 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants