-
Notifications
You must be signed in to change notification settings - Fork 73
Add sycl_khr_free_function_commands extension #644
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
Draft
Pennycook
wants to merge
59
commits into
KhronosGroup:main
Choose a base branch
from
Pennycook:khr_free_function_commands
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
47863fa
Add sycl_khr_free_function_commands extension
Pennycook ebe4dc0
Merge branch 'main' into khr_free_function_commands
Pennycook ce08652
Reword khr_free_function_commands comment
Pennycook 372bb3b
Add periods to khr_free_function_commands comments
Pennycook 9747f7a
Add + marks to code blocks containing ...
Pennycook 2527e90
Require at least 1 reduction in *_reduce functions
Pennycook f63adeb
Replace "must be" with "is" in constraints
Pennycook 47c08f8
Use bulleted list for multiple constraints
Pennycook 15fd80a
Rewrite preconditions for USM copy functions
Pennycook 9c62792
Fix typo in non-normative note
Pennycook 4377549
Define kernel object overloads via equivalence
Pennycook c24fb13
Clarify dependencies for command_/event_barrier
Pennycook 664a912
Clarify that event_barrier can be a no-op
Pennycook 16111b2
Add missing invocation constructor
Pennycook 88b540a
Restart numbering at 1 in each synopsis block
Pennycook 2575901
Replace backticks with [code] environment
Pennycook 8fa1ce2
Add + marks to code blocks containing ... again
Pennycook 8d79af4
Fix grammar: "is" to "are"
Pennycook 2ba2394
Fix formatting of bulleted lists
Pennycook e382dbc
Fix more instances of "is" that should be "are"
Pennycook a9bdc10
Remove unnecessary device-copyable constraint
Pennycook 269706c
Remove khr::invocation from free_function_commands
Pennycook fa8a8f6
Remove empty issues section
Pennycook db380b4
Add missing constraints to fill overloads
Pennycook d26831a
Remove *_reduce functions for kernel objects
Pennycook 75867f7
Fix copy-paste error in launch_task definition
Pennycook 151f632
Remove unnecessary "is"
Pennycook 32d11f5
Explain potential performance overhead of events
Pennycook 165d07e
Add no-op note to command_barrier
Pennycook be56bb7
Weaken note about no-op from "is" to "may be"
Pennycook 9897e6d
Fix copy-paste error in khr::copy
Pennycook b756d9e
Change KHR names to lower case
Pennycook e68a7c0
Remove sycl:: in free-function-command synopses
Pennycook 96c101e
Add missing require() calls from queue overloads
Pennycook b279f37
Fix alignment of overload numbers
Pennycook d7ce65f
Fix parameter pack syntax
Pennycook 19440ec
Add missing ptr parameter to memset
Pennycook c63e287
Use const queue& for khr_free_function_commands
Pennycook b314b77
Fix alignment of (1), (2) in khr_free_functions
Pennycook f1c9607
Add new line between extensions
Pennycook caf3b0a
Forbid calling anything after a free function
Pennycook ae40379
Add comments with references to old APIs
Pennycook a9289fe
Revert "Forbid calling anything after a free function"
Pennycook 1e3737b
Remove all handler overloads
Pennycook f9ca360
Add khr::requirements class and overloads
Pennycook 3057215
Allow kernel_bundle as a requirement
Pennycook 3f66bb4
Use "status" instead of "state" for events
Pennycook bbd090e
Forbid requirements with multiple tracking objects
Pennycook 5edf35d
Add blank line before bulleted list
Pennycook 44ed92c
Expand Requirements... parameter pack correctly
Pennycook 3073621
Support only non-deprecated accessors
Pennycook 2afc9f0
Add exposition-only paragraph to function synopses
Pennycook f31095a
Add constraints to limit kernel bundles to kernels
Pennycook fcd2ca0
Add constraints to limit accessors to kernels
Pennycook 1ee9698
Add constraints to limit accessor targets
Pennycook 547c100
Use requirements in free function commands example
Pennycook 896d71f
Merge branch 'main' into khr_free_function_commands
TApplencourt 288047b
Testing
gmlueck a844ce8
Testing again
gmlueck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The exposition-only function names don't seem to be rendered in italics in the PDF render.
Note the comment above saying that italics don't work in asciiidoctor-pdf. However, I'm not sure why this would be. Italics do seem to be working in general in the PDF render, so maybe it's some weird interaction with the rouge highlighter. I wonder if the real problem, though, is that we're just not installing the correct font.
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.
Yes, I think you're right. asciidoctor/asciidoctor-pdf#2350 (comment) suggests its because the default monospace font selected by asciidoctor for PDFs does not have an italic version.
I don't have any opinion at all about which fonts we should use. Is there a reason that we use different fonts for the HTML and PDF versions?
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 haven't looked into it much. It seems like we use the default fonts mostly for both HTML and PDF. There's some tooling for KaTeX fonts in the HTML render, but I think this is related to the math package.
The asciidoc-pdf comment you linked above says to install a custom font if you want italic monospace. That might be worth exploring.
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.
Okay, I spent some time exploring this.
Using a custom font is straightforward, and you just have to point AsciiDoctor to where the font lives via your theme file (which for us is
config/themes/pdf-theme.yml). See https://docs.asciidoctor.org/pdf-converter/latest/theme/custom-font/ for full details. Unfortunately, getting things to work with the SYCL specification seems much harder than this.I couldn't figure out how to pass extra arguments to our docker-based build system, and I also couldn't figure out whether we'd need/want to put the new fonts inside the docker image or if we'd have to import them somehow.
I tried to make progress just by replacing all instances of "M+ 1mn" with "Courier" (since that font is available and should support italics), but that leads to errors and warnings in the build:
I think we could fix the warnings by swapping π for something that's valid code, using an obvious placeholder constant like
PI, or perhaps rewriting the block so that{pi}is not inside of[code]tags.For the errors... I don't know what to do. As far as I can tell, changing the font is slightly adjusting the height of some table cells, which makes them big enough to fail to compile. This is probably a sign that our table cells are too large, and I hope it will fix itself when we have finished moving everything to the new format.
So... what should we do here? Should I just open a new issue to track supporting monospace italics in the PDF build? The exposition-only names are still obviously declared as such, both via a comment and the use of an invalid C++ name.
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 think we can pass additional command line options to Asciidoctor by changing the
ADOCPDFOPTSvariable in the Makefile. I also think we could ask for the docker image to be updated to contain new font files if we want. Would this help?From your experiment, it seems like we either need to find a font that defines a "pi" character, or somehow change the font used for the code listing blocks without changing the font used for the inline
[code]markup. (I think the "pi" characters are all in inline[code]markup.) I'm not sure if either of these are easy to do.The table cell overflow on page 139 looks like the same one that @steffenlarsen found, which he fixed via #824. I'm not sure about the others because I don't see any table cells on those pages that are close to overflowing. Maybe they are just an artifact of the overflow on page 139? Or maybe your new font does something really weird when there is an unrenderable character, which causes the table cell to overflow?
If we could use the new font only for the code listing blocks (and not the inline
[code]markup), that might also fix the table cell overflow problem. The overflow on page 139 is due to the[code]markup, not the code listing block.If there is no easy way to fix the problems, I think we could live with the lack of italics in the code listings. I think most people use the HTML rendering. I was going to suggest that we could stop creating a PDF render entirely, but it seems like all the other Khronos specs have both HTML and PDF, so I guess this is a bad idea.
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.
Just changing the font for source blocks causes a different set of table cells to overflow. I've tried changing the font size too, but a different set of table cells overflow.
I don't think I know enough about AsciiDoctor and how it handles fonts to fix this. The fact that I can't even see what went wrong (just an error message) is pretty frustrating.
I'm sure this is fixable, but I have no idea what I'm doing. It might be a better idea to get somebody like Jon Leech to take a look at it.