-
Notifications
You must be signed in to change notification settings - Fork 33
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
Explicit make targets for cuda, cppnone, cppsse4 etc (make cuda and cpp builds independent from each other) #602
Comments
Hi @roiser @Jooorgen this issue #602 (together with #680) is almost spot on with the things that we just discussed. So, rather than opening a new one, I will document here our discussion. Also cc @hageboeck @zeniheisser @oliviermattelaer The actual motivation of our discussion was about adding a HIP target to the builds and increase the control over it (in Jorgen's present implementation, HIP libraries are built only if a hip compiler exists but the cuda compiler does not exist). However, the strategy we discussed can/should be implemented even bore HIP is introduced. (Therefore I suggest creating a MR on upstream/master that only deals with cpp and cuda... then adding a hip target will become trivial). OVERVIEW The idea is that
FIRST PART: cudacpp.mk (Eventually, we might think of replacing our 'none', 'sse4' names etc by something more portable to ARM etc. For the moment, lets stick to those.) (Also, we discussed whether to use specific x86 targets, or even the new v1/v2 of https://www.phoronix.com/news/GCC-11-x86-64-Feature-Levels, I would avoid this for now as we will not do any cross compilation of arm from x86 etc). This means that for cudacpp.mk we should support these targets
These different targets would build ONLY either cuda or a specific AVX build. The AVX variable should disappear from the makefile as it is absorbed in the target. (Presently we run The selection of the "best" AVX for a specific target should also disappear from the makefile (unless we think for instance of adding Each build of cuda or one cpp would go to one directory. For the moment, let's keep USEBUILDDIR as optional and supported. Whether in the local directory (USEBUILDDIR=0) or in a build specific build dir (USEBUILDDIR=1), lets keep the lockfile preventing the mixing of builds:
Since each directory would include either cuda or one cpp build, the runTest.exe executable would only include cuda or one cpp. That is to say, we would no longer have to worry about linking cuda anc cpp in the same executable. (This seems to defeta the purpose of using separate gpu and cpu namespaces in #725, but actually I think that we should still consider the possibility of having heterogeneous applications or fat binaries in the future... so let's keep separate namespaces while also using separate build directpries for cuda and cpp). The CI tests would also need to change. Up until now in each job we were doing a The SECOND PART: fortran makefile The way the fortran makefile calls the cudacpp.mk can certainly be improved... but for the moment lets focus on just implementing the same stuff as above. We now have (in different build directories) three targets We should also replace the We now have three In the runcard, we also need to add the same mechanism, and split the cpp backend into 5 different ones. (@oliviermattelaer if you prefer the runcard could have a simdnone, simdsse4 etc naming as this is the onl bit that is user-facing... but in the makefile I would stick to cpp for simplicity). The fortran makefile presently calls
Maybe this .cudacpplibs can disappear if we just internally use the various
Note that the build directories will have different names (so these names must all be dicovered as presently done for the single build dir). Final point, note that CONCLUSIONS @Jooorgen I assign this to you... but let me know if you need help! Anyone else, comments welcome! PS Renaming as I had missed one o in Jorgen's username... |
Thisis ajust a reminder for myself in cudacpp.
In any normal build with a fixed AVX value we are now building together the cuda and cpp gcheck/check.exe, gCPPProcess.o/CPPProcess.o, and a single runTest.exe.
There are many reasons why we should find a better way
The text was updated successfully, but these errors were encountered: