Skip to content

Commit

Permalink
attempt at fixing bazel test issues (#2769) (#2779)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Faust <[email protected]>
  • Loading branch information
olegkkruglov and icfaust authored May 21, 2024
1 parent 24fdf50 commit 6aa9c1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ class infinite_sum_test_random : public reduction_test_random<Param> {
}

void generate_input(bool maxval) {
double mininp = 0.9 * (double)maxval * std::numeric_limits<double>::max() - 1.0f;
double maxinp = (double)maxval * std::numeric_limits<double>::max();
float mininp = 0.9 * (float)maxval * std::numeric_limits<float>::max() - 1.0f;
float maxinp = (float)maxval * std::numeric_limits<float>::max();
const auto train_dataframe = GENERATE_DATAFRAME(
te::dataframe_builder{ this->height_, this->width_ }.fill_uniform(mininp, maxinp));
this->input_table_ = train_dataframe.get_table(this->get_homogen_table_id());
Expand All @@ -319,7 +319,8 @@ TEMPLATE_LIST_TEST_M(infinite_sum_test_random,
"Randomly filled reduction with infinte sum",
"[reduction][rm][small]",
finiteness_types) {
SKIP_IF(this->not_float64_friendly());
// Temporary workaround: skip tests on architectures that do not support native float64
SKIP_IF(!this->get_policy().has_native_float64());
const bool use_infnan = GENERATE(0, 1);
this->generate(use_infnan);
SECTION("Reduce Row-Major by Rows") {
Expand Down Expand Up @@ -368,7 +369,8 @@ TEMPLATE_LIST_TEST_M(single_infinite_test_random,
"Randomly filled reduction with single inf or nan",
"[reduction][rm][small]",
finiteness_types) {
SKIP_IF(this->not_float64_friendly());
// Temporary workaround: skip tests on architectures that do not support native float64
SKIP_IF(!this->get_policy().has_native_float64());
const bool use_infnan = GENERATE(0, 1);
this->generate(use_infnan);
SECTION("Reduce Row-Major by Rows") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ TEMPLATE_LIST_TEST_M(infinite_sum_rm_test_random,
"Randomly filled Row-Major Row-Wise reduction with infinte sum",
"[reduction][rm][small]",
finiteness_types) {
SKIP_IF(this->not_float64_friendly());

// Temporary workaround: skip tests on architectures that do not support native float64
SKIP_IF(!this->get_policy().has_native_float64());
const bool use_infnan = GENERATE(0, 1);
this->generate(use_infnan);
SKIP_IF(this->should_be_skipped());
Expand All @@ -326,8 +326,8 @@ TEMPLATE_LIST_TEST_M(infinite_sum_rm_test_random,
"Randomly filled Row-Major Col-Wise reduction with infinte sum",
"[reduction][rm][small]",
finiteness_types) {
SKIP_IF(this->not_float64_friendly());

// Temporary workaround: skip tests on architectures that do not support native float64
SKIP_IF(!this->get_policy().has_native_float64());
const bool use_infnan = GENERATE(0, 1);
this->generate(use_infnan);
SKIP_IF(this->should_be_skipped());
Expand Down Expand Up @@ -368,8 +368,8 @@ TEMPLATE_LIST_TEST_M(single_infinite_rm_test_random,
"Randomly filled Row-Major Row-Wise reduction with single inf or nan",
"[reduction][rm][small]",
finiteness_types) {
SKIP_IF(this->not_float64_friendly());

// Temporary workaround: skip tests on architectures that do not support native float64
SKIP_IF(!this->get_policy().has_native_float64());
const bool use_infnan = GENERATE(0, 1);
this->generate(use_infnan);
SKIP_IF(this->should_be_skipped());
Expand All @@ -382,8 +382,8 @@ TEMPLATE_LIST_TEST_M(single_infinite_rm_test_random,
"Randomly filled Row-Major Col-Wise reduction with single inf or nan",
"[reduction][rm][small]",
finiteness_types) {
SKIP_IF(this->not_float64_friendly());

// Temporary workaround: skip tests on architectures that do not support native float64
SKIP_IF(!this->get_policy().has_native_float64());
const bool use_infnan = GENERATE(0, 1);
this->generate(use_infnan);
SKIP_IF(this->should_be_skipped());
Expand Down

0 comments on commit 6aa9c1e

Please sign in to comment.