Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Conversation

@Ruyk
Copy link

@Ruyk Ruyk commented Nov 24, 2016

  • Host matrix multiplication deals with non-divisible sizes of matrix
  • SYCL variant only accepts power-of-two matrix sizes
  • Error correction is added to both host and sycl variants
Ruyman Reyes added 4 commits October 12, 2016 16:01
This patch adds some licensing and documentation information for the FindComputeCpp module in order to easily re-distribute the FindComputeCpp file without the rest of the SDK.
* Host matrix multiplication deals with non-divisible sizes of matrix * SYCL variant only accepts power-of-two matrix sizes * Error correction is added to both host and sycl variants
std::cout << " The order is : " << matSize << std::endl;
std::cout << " The blockSize is : " << blockSize << std::endl;
// Make sure the block size is not larger than the mat size
blockSize = min(matSize, blockSize);
Copy link
Member

Choose a reason for hiding this comment

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

This will be cl::sycl::min because of the using statement in this file

}
if (!error) {
std::cout << "Success" << std::endl;
;
Copy link
Member

Choose a reason for hiding this comment

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

Lonely semi-colon

Copy link
Author

Choose a reason for hiding this comment

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

Removed

}
}
std::cout << "GFLOPs: " << flops << std::endl;
std::cout << " Output " << std::endl;
Copy link
Member

Choose a reason for hiding this comment

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

This will be printed on a line by itself

Copy link
Member

@DuncanMcBain DuncanMcBain left a comment

Choose a reason for hiding this comment

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

Could you also run clang-format on this file? Other than the comments, lgtm!

// Testing
for (int i = 0; i < matSize; i++)
for (int j = 0; j < matSize; j++) {
if (std::fabs(MC[i * matSize + j] - MB[i * matSize + j]) > 1e-8) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we replace this with something like the sample from here? Sounds pedantic, but I'm worried that for larger numbers (say ~100) that will be spuriously false, or that for small numbers it will be incorrectly true.

Copy link
Author

Choose a reason for hiding this comment

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

This was there before my latest changes, so I rather not change it in this patch.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, it was? My bad, I'll add it myself then, rather than be a hypocrite! But in a separate merge request. Thanks very much!

Ruyman Reyes added 2 commits November 24, 2016 16:34
* Clang-format matrix multiply * Added missing std:: to min
@DuncanMcBain DuncanMcBain merged commit ec34e94 into codeplaysoftware:master Nov 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants