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

"Devices" Information Descriptors format #75

Open
PetroBondar opened this issue Oct 11, 2023 · 9 comments
Open

"Devices" Information Descriptors format #75

PetroBondar opened this issue Oct 11, 2023 · 9 comments

Comments

@PetroBondar
Copy link
Contributor

We faced some problems with updating the Information Descriptors section for sycl::device. We have three options for how information can be formatted there:

  1. In table like we did in "Platforms" and "Contexts":
    image

    KHRGA-57_RC_devices branch

    Pros: Consistency, description added, easy-to-understand structure
    Cons: Some names are so long (even if you try to shrink them) that the table becomes enormously wide (still looking for a solution), so the contents will cover it partially. The page becomes very big.

  2. Using subsections:
    image

    KHRGA-57_RC_devices_no_table branch

    Pros: Description added, full names without removing scopes, easy-to-understand structure
    Cons: For consistency, updating "Platforms" and "Contexts" will be necessary. The page becomes very big

  3. Leaving the link to the spec, like it was previously:
    image

    Pros: The page will become more concise
    Cons: No description will be added for "Information Descriptors"

Which option is better? Or are there any other proposals?

@mkinsner
Copy link

I prefer the table format (option 1), but I agree that the navigation bar on the right overlapping with the table contents isn't great. I think we should continue with option 1, and can adjust later if needed. The navigation bar only covers the top rows of text so the table is still very usable.

Option 2 makes the navigation bar too long with all the subsections and is generally too long in content, and option 3 doesn't provide enough information.

@PetroBondar
Copy link
Contributor Author

Ok, I think, we'll proceed with option 1 for now.

Should we in this case provide full names (starting with sycl:: namespace)? It'll make the table a bit wider, but we'll сomply with the issue #72

@mkinsner
Copy link

Yes, I think we should include sycl:: on the descriptor names for consistency. We can consider other options in the future once we have experience with this format.

@gmlueck
Copy link
Contributor

gmlueck commented Oct 11, 2023

Couldn't we have something like option 2, but without making subsections? This would avoid super wide tables, and it would avoid the long navigation bar that @mkinsner is concerned about.

@mkinsner
Copy link

Couldn't we have something like option 2, but without making subsections? This would avoid super wide tables, and it would avoid the long navigation bar that @mkinsner is concerned about.

I think that would be fine as well. Can we avoid the subsection navigation bar issues easily?

@rscohn2
Copy link
Member

rscohn2 commented Oct 11, 2023

I think that would be fine as well. Can we avoid the subsection navigation bar issues easily?

A rubric might do it.

https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-rubric

@PetroBondar
Copy link
Contributor Author

I tried different approaches and, as I understood, using a rubric is the best one for now...

image

In code it will look somehow like this:

.. rubric:: ``sycl::info::device::device_type``

Returns the device type associated with the device.
May not return ``sycl::info::device_type::all``.

+--------------------------------------+
| Return type: :ref:`info-device_type` |
+--------------------------------------+


.. rubric:: ``sycl::info::device::vendor_id``

Returns a unique vendor device identifier.

+---------------------------+
| Return type: ``uint32_t`` |
+---------------------------+

Another option was to modify the content box to ignore lower-level sub-titles and use them (it will look better, I believe, but I didn't figure out how to modify contents on this page)

@gmlueck
Copy link
Contributor

gmlueck commented Oct 11, 2023

I like the way this looks in the rendered HTML, and I prefer it to either of the previous options.

Another option was to modify the content box to ignore lower-level sub-titles and use them (it will look better, I believe, but I didn't figure out how to modify contents on this page)

This could be good too. I suppose it has the advantage that each info descriptor would have it's own URL, so you could easily point someone to a specific descriptor (e.g. in an email conversation).

@PetroBondar
Copy link
Contributor Author

If everyone is okay with how it looks, we can make it this way.

Meanwhile, I'll try to investigate if there is a way to ignore sub-titles in Contents.

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

No branches or pull requests

4 participants