-
Notifications
You must be signed in to change notification settings - Fork 80
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
add vector scale a and b in sample code #1163
base: develop
Are you sure you want to change the base?
Conversation
Running tests... 100% tests passed, 0 tests failed out of 40 Total Test time (real) = 2969.91 sec |
if(returnedAlgoCount == 0) | ||
{ | ||
std::cerr << "No valid solution found!" << std::endl; | ||
return; |
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.
please also free the allocated memory and descriptor before early return
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 will create another PR to free the allocated memory and descriptor before early return in every sample code
CHECK_HIPBLASLT_ERROR(gemm.initialize(heuristicResult[0].algo, d_workspace)); | ||
CHECK_HIPBLASLT_ERROR(gemm.run(stream)); | ||
|
||
std::cout << "Matrix multiplication completed successfully." << std::endl; |
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.
free memory
std::vector<float> scale_a(128, 0.5f); // Scale A vector setting | ||
std::vector<float> scale_b(128, 2.0f); // Scale B vector setting | ||
|
||
std::cout << "Running with Scale A = [0.5, ..., 0.5], Scale B = [2.0, ..., 2.0]" << std::endl; |
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.
It is better to use different value for each scale A element since this example is scale A/B VECTOR but not scalar.
|
||
int main() | ||
{ | ||
// This is an example using hipblaslt extension API: ScaleA & ScaleB & ScaleC |
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.
no ScaleC in this example
add a and b vector scale
No description provided.