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

TEST: bazel test of gpu primitives in CI scope #2725

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cpp/oneapi/dal/backend/primitives/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ dal_collect_test_suites(
name = "tests",
modules = [
"blas",
"distance",
"heap",
"lapack",
"optimizers",
Expand All @@ -93,6 +94,7 @@ dal_collect_test_suites(
"regression",
"rng",
"selection",
"search",
"sort",
"sparse_blas",
"stat",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ TEMPLATE_LIST_TEST_M(cosine_distance_test_random,
"Randomly filled cosine-distance computation",
"[cosine][distance][small]",
distance_types) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_distance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ TEMPLATE_LIST_TEST_M(sql2_distance_test_random,
"Randomly filled squared L2-distance computation",
"[l2][distance][small]",
distance_types) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_squared_l2_distance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ TEMPLATE_LIST_TEST_M(inner_product_test_random,
"Randomly filled Inner-Product computation",
"[l2][ip][aux][small]",
types_to_check) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_inner_product();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ template <typename T, ndorder order>
auto table_to_ndarray(sycl::queue& q, const table& t) {
const auto rc = t.get_row_count();
const auto cc = t.get_column_count();
auto res = ndarray<T, 2, order>::empty(q, { rc, cc });
auto res = ndarray<T, 2, order>::empty(q, { rc, cc }, sycl::usm::alloc::host);
for (std::int64_t r = 0; r < rc; ++r) {
const auto row = row_accessor<const T>(t).pull(q, { r, r + 1 });
for (std::int64_t c = 0; c < cc; ++c) {
Expand Down Expand Up @@ -259,6 +259,7 @@ TEMPLATE_LIST_TEST_M(search_test,
"Randomly filled cosine-distance search",
"[chebyshev][search][small]",
search_types) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_correctness();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ template <typename T, ndorder order>
auto table_to_ndarray(sycl::queue& q, const table& t) {
const auto rc = t.get_row_count();
const auto cc = t.get_column_count();
auto res = ndarray<T, 2, order>::empty(q, { rc, cc });
auto res = ndarray<T, 2, order>::empty(q, { rc, cc }, sycl::usm::alloc::host);
for (std::int64_t r = 0; r < rc; ++r) {
const auto row = row_accessor<const T>(t).pull(q, { r, r + 1 });
for (std::int64_t c = 0; c < cc; ++c) {
Expand Down Expand Up @@ -261,6 +261,7 @@ TEMPLATE_LIST_TEST_M(search_test,
"Randomly filled cosine-distance search",
"[cosine][search][small]",
search_types) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_correctness();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ template <typename T, ndorder order>
auto table_to_ndarray(sycl::queue& q, const table& t) {
const auto rc = t.get_row_count();
const auto cc = t.get_column_count();
auto res = ndarray<T, 2, order>::empty(q, { rc, cc });
auto res = ndarray<T, 2, order>::empty(q, { rc, cc }, sycl::usm::alloc::host);
for (std::int64_t r = 0; r < rc; ++r) {
const auto row = row_accessor<const T>(t).pull(q, { r, r + 1 });
for (std::int64_t c = 0; c < cc; ++c) {
Expand Down Expand Up @@ -253,6 +253,7 @@ TEMPLATE_LIST_TEST_M(search_test,
"Randomly filled L2-distance search",
"[l2][search][small]",
search_types) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_correctness();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ template <typename T, ndorder order>
auto table_to_ndarray(sycl::queue& q, const table& t) {
const auto rc = t.get_row_count();
const auto cc = t.get_column_count();
auto res = ndarray<T, 2, order>::empty(q, { rc, cc });
auto res = ndarray<T, 2, order>::empty(q, { rc, cc }, sycl::usm::alloc::host);
for (std::int64_t r = 0; r < rc; ++r) {
const auto row = row_accessor<const T>(t).pull(q, { r, r + 1 });
for (std::int64_t c = 0; c < cc; ++c) {
Expand Down Expand Up @@ -264,6 +264,7 @@ TEMPLATE_LIST_TEST_M(search_test,
"Randomly filled Lp-distance search",
"[l2][search][small]",
search_types) {
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
this->generate();
this->test_correctness();
Expand Down
Loading