Skip to content

The accum_or_assign_test test case failed to run #232

@zhangyachen

Description

@zhangyachen

When running the test case test_accum_or_assign_values_check from tests/accum_or_assign_test.cc.cu, if you change the parameter of test_accum_or_assign_values_check to 1 and change the max_hbm_for_vectors from GB to KB (meaning you set it to a relatively small value in KB), then the test case will generate many errors.

TEST(AccumOrAssignTest, test_accum_or_assign_values_check) {
  test_accum_or_assign_values_check(1);    // change this
  // TODO(rhdong): Add back when diff error issue fixed in hybrid mode.
  // test_insert_or_assign_values_check(0);
}

void test_accum_or_assign_values_check(size_t max_hbm_for_vectors) {
  const size_t U = 524288;
  const size_t init_capacity = 1024;
  const size_t B = 524288 + 13;
  constexpr size_t dim = 64;

  TableOptions opt;

  opt.max_capacity = U;
  opt.init_capacity = init_capacity;
  opt.max_hbm_for_vectors = nv::merlin::KB(max_hbm_for_vectors);      // change this
  using Table = nv::merlin::HashTable<K, V, S, EvictStrategy::kLru>;
  opt.dim = dim;

  cudaStream_t stream;
  CUDA_CHECK(cudaStreamCreate(&stream));

  // ... other code
}

test result:

/projects/MiHierarchicalKV/build# ./accum_or_assign_test --gtest_filter=AccumOrAssignTest.test_accum_or_assign_values_check
Running main() from /projects/MiHierarchicalKV/tests/googletest/googletest/src/gtest_main.cc
Note: Google Test filter = AccumOrAssignTest.test_accum_or_assign_values_check
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AccumOrAssignTest
[ RUN      ] AccumOrAssignTest.test_accum_or_assign_values_check
/projects/MiHierarchicalKV/tests/accum_or_assign_test.cc.cu:2821: Failure
Expected equality of these values:
  value_diff_cnt
    Which is: 9055
  0
/projects/MiHierarchicalKV/tests/accum_or_assign_test.cc.cu:2821: Failure
Expected equality of these values:
  value_diff_cnt
    Which is: 5991
  0
/projects/MiHierarchicalKV/tests/accum_or_assign_test.cc.cu:2821: Failure
Expected equality of these values:
  value_diff_cnt
    Which is: 6085
  0
^C

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions