Skip to content

Commit

Permalink
ta_cc_abcd: GFLOP = 10^9 FLOP, not 12^30 FLOP
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Jul 22, 2024
1 parent c9302ed commit 269c59b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/device/ta_cc_abcd_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ void cc_abcd(TA::World& world, const TA::TiledRange1& trange_occ,
const double flops_per_fma =
(complex_T ? 8 : 2); // 1 multiply takes 6/1 flops for complex/real
// 1 add takes 2/1 flops for complex/real
const double n_gflop = flops_per_fma * std::pow(n_occ, 2) *
std::pow(n_uocc, 4) / std::pow(1024., 3);
const double n_gflop =
flops_per_fma * std::pow(n_occ, 2) * std::pow(n_uocc, 4) / 1e9;

using deviceTile =
btas::Tensor<T, TA::Range, TiledArray::device_um_btas_varray<T>>;
Expand Down
4 changes: 2 additions & 2 deletions examples/gemm/ta_cc_abcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ void cc_abcd(TA::World& world, const TA::TiledRange1& trange_occ,
const double flops_per_fma =
(complex_T ? 8 : 2); // 1 multiply takes 6/1 flops for complex/real
// 1 add takes 2/1 flops for complex/real
const double gflops_per_call = flops_per_fma * std::pow(n_occ, 2) *
std::pow(n_uocc, 4) / std::pow(1024., 3);
const double gflops_per_call =
flops_per_fma * std::pow(n_occ, 2) * std::pow(n_uocc, 4) / 1e9;

// Construct tensors
TA::TArrayD t2(world, trange_oovv);
Expand Down
3 changes: 2 additions & 1 deletion examples/gemm/ta_dense_asymm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ int main(int argc, char** argv) {
if (do_memtrace) {
world.gop.fence();
madness::print_meminfo(world.rank(), str);
} else {
world.gop.fence();
}
#ifdef TA_TENSOR_MEM_PROFILE
{
world.gop.fence();
std::cout
<< str << ": TA::Tensor allocated "
<< TA::hostEnv::instance()->host_allocator_getActualHighWatermark()
Expand Down

0 comments on commit 269c59b

Please sign in to comment.