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

Programming interface #3532

Draft
wants to merge 1 commit into
base: docs/develop
Choose a base branch
from
Draft

Programming interface #3532

wants to merge 1 commit into from

Conversation

neon60
Copy link
Contributor

@neon60 neon60 commented Jun 27, 2024

@randyh62 The programming interface currently.

@neon60 neon60 marked this pull request as draft June 27, 2024 15:08
@neon60 neon60 force-pushed the programming_interface branch 2 times, most recently from e8ce33e to 0c1132d Compare June 29, 2024 10:42
@neon60 neon60 changed the base branch from develop to docs/develop July 4, 2024 10:23
@neon60 neon60 force-pushed the programming_interface branch 2 times, most recently from 568a8c5 to 441730f Compare July 16, 2024 13:17
docs/understand/programming_interface.rst Outdated Show resolved Hide resolved

The programming interface document will focus on the HIP runtime API. The runtime API provides C and C++ functions for event, stream, device and memory managements, etc. The HIP runtime on AMD platform uses the Common Language Runtimes (CLR), while on NVIDIA platform HIP runtime is only a thin layer over the CUDA runtime.

- **CLR** contains source codes for AMD's compute languages runtimes: ``HIP`` and ``OpenCL™``. CLR includes the implementation of ``HIP`` language on the AMD platform `hipamd <https://github.com/ROCm/clr/tree/develop/hipamd>`_ and the Radeon Open Compute Common Language Runtime (rocclr). rocclr is a virtual device interface, that HIP runtime interact with different backends such as ROCr on Linux or PAL on Windows. (CLR also include the implementation of `OpenCL <https://github.com/ROCm/clr/tree/develop/opencl>`_, while it's interact with ROCr and PAL)

Choose a reason for hiding this comment

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

CLR contains source codes for AMD's common languages runtimes:

docs/understand/programming_interface.rst Outdated Show resolved Hide resolved
docs/understand/programming_interface.rst Outdated Show resolved Hide resolved
docs/understand/programming_interface.rst Outdated Show resolved Hide resolved
docs/understand/programming_interface.rst Outdated Show resolved Hide resolved
docs/understand/programming_interface.rst Outdated Show resolved Hide resolved
docs/understand/programming_interface.rst Outdated Show resolved Hide resolved
@neon60 neon60 force-pushed the programming_interface branch 2 times, most recently from d9b1cb2 to 1d02157 Compare August 20, 2024 12:11
@neon60 neon60 mentioned this pull request Aug 20, 2024
@neon60 neon60 force-pushed the programming_interface branch 2 times, most recently from d1b9a3e to 8d4d17b Compare August 22, 2024 20:30
@MKKnorr MKKnorr self-requested a review September 4, 2024 13:38
Copy link

@MKKnorr MKKnorr left a comment

Choose a reason for hiding this comment

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

Good job overall, mostly just nitpicking about wording or adding details

.wordlist.txt Show resolved Hide resolved
docs/.gitignore Outdated Show resolved Hide resolved
docs/conf.py Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
Comment on lines 141 to 140
Read-only storage visible to all threads in a given grid. It is a limited
segment of global with queryable size.
Copy link

Choose a reason for hiding this comment

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

I think this should highlight the differences to global memory, i.e. (possibly) different caching, and performance recommendations.
Also I'm not sure if it's really a segment of global memory (which is a logical partition), but rather part of device memory (as in physically located there)

Suggested change
Read-only storage visible to all threads in a given grid. It is a limited
segment of global with queryable size.
Read-only storage visible to all threadson a given device. It is a limited
segment backed by device memory with queryable size. It needs to be set by the host before kernel execution.
Constant memory provides the best performance benefit when all threads within a warp access the same address.

Copy link
Contributor Author

@neon60 neon60 Sep 18, 2024

Choose a reason for hiding this comment

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

Maybe here given grid was better. Updated. Let's discuss offline.

docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
Unified Memory is a single memory address space accessible from any processor
within a system. This setup simplifies memory management processes and enables
applications to allocate data that can be read or written by code running on
either CPUs or GPUs. The Unified memory model is shown in the following figure.
Copy link

Choose a reason for hiding this comment

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

There is no figure here :)

Also, should the performance implications be mentioned here?

docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
docs/understand/hip_runtime_api.rst Outdated Show resolved Hide resolved
@neon60 neon60 force-pushed the programming_interface branch 2 times, most recently from ea3b4f7 to 0c6386c Compare September 11, 2024 13:09
@neon60 neon60 force-pushed the programming_interface branch 2 times, most recently from 5e25f0a to 77cd365 Compare September 17, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants