Call for Discussion: New Project: Babylon
David Alayachew
davidalayachew at gmail.com
Wed Sep 6 19:15:28 UTC 2023
Hello Paul,
Thanks for posting this and the attached videos! I'm very excited for the
possibilities that this project Babylon will bring about, but I do have a
handful of initial questions.
1 - Can you help differentiate the goals between Babylon and Panama's
FFI/M? I don't understand either project very well, and (from my ignorant
perspective) there seems to be a lot of overlap. What separates them?
2 - I read a little about Project Sumatra, and other attempts for Java to
interact with the GPU. While this project has a bigger end goal, will it be
Java's current, main attempt to tackle GPU in the programming language?
2.1 - If yes, what lessons have we learned from the past projects?
Clearly, this is coming from a wildly different direction, but hearing
about some motivations might help us understand the WHY along with the WHAT.
3 - Just flipping through the slides and having watched the videos, that is
an intimidating amount of complexity. It intimidated me at least. Who is
the target audience for this project, and what steps are needed to get them
equipped to use these tools effectively? To give an example of the second
question, String templates are clearly a needed and valuable feature, but
it has become clear that the use cases and intended semantics for it aren't
exactly clear to all Java developers. After extended discussion on the
mailing lists and various social media threads, there's talk about a user
guide for String templates being created. A similar thing was done for Text
Blocks, if I'm not mistaken. I guess a better way of restating question 2
is, do you foresee difficulties in getting developers to see the use cases
and intended semantics of the code reflection you spoke of? And if so, what
steps do you plan to take to "nip it in the bud", so to speak?
4 - Why Babylon?
Thank you for your time and help!
David Alayachew
On Wed, Sep 6, 2023 at 2:30 PM Paul Sandoz <paul.sandoz at oracle.com> wrote:
> I hereby invite discussion of a new Project, Babylon, whose primary goal
> will be to extend the reach of Java to foreign programming models such as
> SQL, differentiable programming, machine learning models, and GPUs.
>
> Focusing on the last example, suppose a Java developer wants to write a
> GPU
> kernel in Java and execute it on a GPU. The developer’s Java code must,
> somehow, be analyzed and transformed into an executable GPU kernel. A Java
> library could do that, but it requires access to the Java code in symbolic
> form. Such access is, however, currently limited to the use of
> non-standard
> APIs or to conventions at different points in the program’s life cycle
> (compile time or run time), and the symbolic forms available (abstract
> syntax trees or bytecodes) are often ill-suited to analysis and
> transformation.
>
> Babylon will extend Java's reach to foreign programming models with an
> enhancement to reflective programming in Java, called code reflection.
> This
> will enable standard access, analysis, and transformation of Java code in
> a
> suitable form. Support for a foreign programming model can then be more
> easily implemented as a Java library.
>
> Babylon will ensure that code reflection is fit for purpose by creating a
> GPU programming model for Java that leverages code reflection and is
> implemented as a Java library. To reduce the risk of bias we will also
> explore, or encourage the exploration of, other programming models such as
> SQL and differentiable programming, though we may do so less thoroughly.
>
> Code reflection consists of three parts:
>
> 1) The modeling of Java programs as code models, suitable for access,
> analysis, and transformation.
> 2) Enhancements to Java reflection, enabling access to code models at
> compile
> time and run time.
> 3) APIs to build, analyze, and transform code models.
>
> For further details please see the JVM Language Summit 2023 presentations
> entitled "Code Reflection" [1] and "Java and GPU … are we nearly there
> yet?"
> [2].
>
> I propose to lead this Project with an initial set of Reviewers that
> includes, but is not limited to, Maurizio Cimadamore, Gary Frost, and
> Sandhya Viswanathan.
>
> For code reflection this Project will start with a clone of the current
> JDK
> main-line release, JDK 22, and track main-line releases going forward.
> For the GPU programming model this Project will create a separate
> repository,
> that is dependent on code reflection features as they are developed.
>
> We expect to deliver Babylon over time, in a series of JEPs that will
> likely
> span multiple feature releases.
> We do not currently plan to deliver the GPU programming model into the JDK.
> However, work on that model could identify JDK features and enhancements
> of
> general utility which could be addressed in future work.
>
> Comments?
>
> Paul.
>
> [1]
> https://cr.openjdk.org/~psandoz/conferences/2023-JVMLS/Code-Reflection-JVMLS-23-08-07.pdf
> https://youtu.be/xbk9_6XA_IY
>
> [2] https://youtu.be/lbKBu3lTftc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/discuss/attachments/20230906/50ad2c44/attachment-0001.htm>
More information about the discuss
mailing list