Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
TeachRaccooon committed Oct 2, 2024
1 parent a4e6825 commit 3d92940
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
16 changes: 14 additions & 2 deletions benchmark/bench_CQRRP/CQRRP_pivot_quality.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) {
int64_t m = std::stol(size);
int64_t n = std::stol(size);
double d_factor = 1.0;
int64_t b_sz = 1024;
int64_t b_sz = 256;
double tol = std::pow(std::numeric_limits<double>::epsilon(), 0.85);
auto state = RandBLAS::RNGState<r123::Philox4x32>();
auto state_constant1 = state;
Expand All @@ -202,13 +202,25 @@ int main(int argc, char *argv[]) {
// Allocate basic workspace
QR_speed_benchmark_data<double> all_data(m, n, tol, d_factor);
// Generate the input matrix - gaussian suffices for performance tests.
RandLAPACK::gen::mat_gen_info<double> m_info(m, n, RandLAPACK::gen::spiked);
RandLAPACK::gen::mat_gen_info<double> m_info(m, n, RandLAPACK::gen::polynomial);
m_info.cond_num = std::pow(10, 10);
m_info.rank = n;
m_info.exponent = 2.0;
m_info.scaling = std::pow(10, 10);
RandLAPACK::gen::mat_gen(m_info, all_data.A.data(), state);

std::fstream file("A_generated_rows_" + std::to_string(m)
+ "_cols_" + std::to_string(n)
+ "_b_sz_" + std::to_string(b_sz)
+ "_d_factor_" + std::to_string(d_factor)
+ ".dat", std::fstream::app);
for (int i = 0; i < n ; ++i){
for (int j = 0; j < m ; ++j){
file << all_data.A[m * i + j] << ", ";
}
file << "\n";
}

R_norm_ratio(m_info, b_sz, all_data, state_constant1);
printf("R done\n");
sv_ratio(m_info, b_sz, all_data, state_constant2);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/bench_CQRRP/CQRRP_runtime_breakdown.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ int main(int argc, char *argv[]) {
int64_t m = std::stol(size);
int64_t n = std::stol(size);
double d_factor = 1.0;
int64_t b_sz_start = 256;
int64_t b_sz_start = 32;
int64_t b_sz_end = 2048;
double tol = std::pow(std::numeric_limits<double>::epsilon(), 0.85);
auto state = RandBLAS::RNGState<r123::Philox4x32>();
auto state_constant = state;
// Timing results
std::vector<long> res;
// Number of algorithm runs. We only record best times.
int64_t numruns = 10;
int64_t numruns = 5;

// Allocate basic workspace
QR_speed_benchmark_data<double> all_data(m, n, tol, d_factor);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bench_CQRRP/CQRRP_speed_comparisons.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) {
int64_t m = std::stol(size);
int64_t n = std::stol(size);
double d_factor = 1.0;
int64_t b_sz_start = 256;
int64_t b_sz_start = 32;
int64_t b_sz_end = 2048;
double tol = std::pow(std::numeric_limits<double>::epsilon(), 0.85);
auto state = RandBLAS::RNGState<r123::Philox4x32>();
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bench_CQRRP/HQRRP_runtime_breakdown.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) {
int64_t m = std::stol(size);
int64_t n = std::stol(size);
double d_factor = 1.0;
int64_t b_sz_start = 256;
int64_t b_sz_start = 32;
int64_t b_sz_end = 2048;
double tol = std::pow(std::numeric_limits<double>::epsilon(), 0.85);
auto state = RandBLAS::RNGState();
Expand Down
4 changes: 2 additions & 2 deletions benchmark/bench_CQRRP/ICQRRP_subroutines_speed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ int main(int argc, char *argv[]) {
int64_t i = 0;
// Declare parameters
int64_t m = std::stol(size);
int64_t n_start = 256;
int64_t n_stop = 1024;
int64_t n_start = 32;
int64_t n_stop = 2048;
int64_t nb_start = 32;
auto state = RandBLAS::RNGState();
auto state_B = RandBLAS::RNGState();
Expand Down

0 comments on commit 3d92940

Please sign in to comment.