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

[gpu/enhance] Shared memory implementation for Blas kernels #2784

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

s-debadri
Copy link
Contributor

Implementation of shared memory for Blas kernels.

Updates made:

  • Added data pointer for clCreateBuffer calls using wrapper constructor
  • Removed all WriteData calls
  • Used CL_MEM_USE_HOST_PTR flag
  • Used MapBuffer and UnMapBuffer wrappers to ensure cache consistency

Note: GPU can cache buffer data on device memory which might not get flushed to host after kernel execution. To enforce this MapBuffer or ReadData wrapper should be used.

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Debadri Samaddar [email protected]

Implementation of shared memory using proper flags.
Added changes for Blas kernels.

Signed-off-by: Debadri Samaddar <[email protected]>
@taos-ci
Copy link

taos-ci commented Nov 4, 2024

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2784. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

Copy link

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

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

@s-debadri, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Contributor

@baek2sm baek2sm left a comment

Choose a reason for hiding this comment

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

LGTM.

I have a simple question. All of these codes are running within a do-while statement, but why is it necessary to use a do-while loop even though the current while condition is always false?

@s-debadri
Copy link
Contributor Author

LGTM.

I have a simple question. All of these codes are running within a do-while statement, but why is it necessary to use a do-while loop even though the current while condition is always false?

We want the code to return at the point of failure and don't proceed any further. Hence, to avoid multiple nested if-else conditions we are using a do-while loop to make the code readable and clean.

Copy link

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days.

@github-actions github-actions bot added the Stale label Jan 23, 2025
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