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

Simplify the introduction #694

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

Pennycook
Copy link
Contributor

The changes in this commit aim to simplify the introduction, by:

  • Simplifying complex sentences;
  • Removing (most) statements that do not apply to all implementations;
  • Consolidating references to C++, OpenCL, etc to avoid repetition; and
  • Highlighting the key features of SYCL with shorter bullet points.

The result is a significantly shorter introduction (300 words vs 1200 words) that succinctly summarizes what SYCL is and why developers should use it.


Some of the changes I've made here might be a little bit contentious, so I want to provide a little more insight into how I decided what to cut and what to keep.

First, I wrote out a list of questions that I think a reader would hope to be able to answer by reading the introduction. (You can see these questions as comments in the AsciiDoc). Then I reordered all the paragraphs in the existing introduction under those headings, and it became apparent that there was quite a lot of repetition around alignment with C++, access to low-level OpenCL features, etc. So I tried to collapse all of that together.

Second, I took out (almost) everything that described how SYCL implementations work. I convinced myself a lot of this was outdated and probably didn't apply to most implementations. For example, there were claims that it is always possible to use SYCL with arbitrary host compilers and/or without special linkers. I made an exception for a statement that SYCL implementations could choose to be implemented on top of nothing but standard C++, because I think that highlights an interesting aspect of SYCL's design philosophy.

Third, I tried to boil everything down to the really important points, inspired by the introduction to the OpenCL specification. We've got the rest of the specification to explain how features like buffers work, and I think it makes more sense to just point interested readers to the relevant sections.

The changes in this commit aim to simplify the introduction, by:

- Simplifying complex sentences;
- Removing (most) statements that do not apply to all implementations;
- Consolidating references to C++, OpenCL, etc to avoid repetition; and
- Highlighting the key features of SYCL with shorter bullet points.

The result is a significantly shorter introduction (300 words vs 1200 words)
that succinctly summarizes what SYCL is and why developers should use it.
@Pennycook Pennycook added the editorial Some purely editorial problem label Jan 23, 2025
@Pennycook Pennycook requested a review from gmlueck January 23, 2025 14:30
@jbrodman
Copy link
Contributor

I think this is a very nice simplification. It is clear and to the point.

@tomdeakin tomdeakin removed the editorial Some purely editorial problem label Jan 23, 2025
@tomdeakin
Copy link
Contributor

Quick review on this please.

Copy link
Contributor

@tomdeakin tomdeakin left a comment

Choose a reason for hiding this comment

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

LGTM, just one potential nitpick.

adoc/chapters/introduction.adoc Outdated Show resolved Hide resolved
@TApplencourt
Copy link
Contributor

TApplencourt commented Jan 24, 2025

  • Should backend word link to the glossary?
  • And stupid question, but how the // will be rendered? Will they be ignored?

@Pennycook
Copy link
Contributor Author

Should backend word link to the glossary?

You mean the one that says "or ``backend''"? I already linked the second one to the feature.

And stupid question, but how the // will be rendered? Will they be ignored?

Right, they'll be ignored. Those comments were mostly for me to refer to when drafting the new introduction, but I left them in thinking they might help to guide where to place new updates to the introduction in future.

adoc/chapters/introduction.adoc Outdated Show resolved Hide resolved
adoc/chapters/introduction.adoc Outdated Show resolved Hide resolved
@etomzak
Copy link
Contributor

etomzak commented Jan 27, 2025

Looking at the list of commented reader questions, would it make sense to have 1-3 sentences somewhere in there on "What is SYCL used for?"? Obviously it's not a topic for a spec, but it might make sense in an introduction.

What I have in mind is saying things like, "High-performance libraries are developed on top of SYCL, and some applications use SYCL directly. SYCL is used in physics, chemistry, AI, and other domains. SYCL runs on anything from a laptop to a supercomputer." (But worded better.)

Either way, it's a great rewrite of the intro.

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Looks good!

source files as normal {cpp} code, alongside any code intended to be run on a
system's host processor.
This concept, known as "`single-source`" programming, reduces the complexity of
heterogeneous programming for developers and gives compilers greater
Copy link
Member

Choose a reason for hiding this comment

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

+ increase type-safety across the host-device boundary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm having trouble working this in without making the sentence very complicated. I can't see a way to mention type safety specifically without converting things into a list:

This concept--known as "single-source programming"--has several advantages: it reduces the complexity of heterogeneous programming for developers; it guarantees type-safety across the host-device boundary; and it gives compilers greater opportunities to optimize across the host-device boundary.

I've made a minor change in deb636e which I hope gets across the intent without being so complicated:

This concept, known as "single-source" programming, reduces the complexity of heterogeneous programming for developers and gives compilers greater opportunities to analyze/optimize across the host-device boundary.

This acknowledges that the advantages extend beyond optimization to analysis, but doesn't go as far as mentioning type safety.

Copy link
Member

Choose a reason for hiding this comment

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

@keryell to add something in another PR about this.

simple way to build task-graphs without manually managing dependencies.

* <<sec:usm, Unified Shared Memory>> (USM) provides an explicit,
pointer-based, mechanism for managing and sharing data.
Copy link
Member

Choose a reason for hiding this comment

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

It becomes urgent to come with an extension providing a safer API for this. 😿

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you suggesting that we add a comment about safety here?

Copy link
Member

Choose a reason for hiding this comment

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

Are you suggesting that we add a comment about safety here?

No. But it is sad that we go along to #703

@tomdeakin
Copy link
Contributor

WG approved to merge.

@gmlueck gmlueck merged commit f99eca5 into KhronosGroup:main Jan 30, 2025
2 checks passed
@tomdeakin
Copy link
Contributor

Also as clarification to 2020

gmlueck added a commit to gmlueck/SYCL-Docs that referenced this pull request Jan 31, 2025
Cherry pick KhronosGroup#694 from main
(cherry picked from commit f99eca5)
@Pennycook Pennycook mentioned this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants