Skip to content

Commit

Permalink
Remained fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
do-jason committed Oct 17, 2023
1 parent 95393d7 commit 81f827a
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 17 deletions.
71 changes: 71 additions & 0 deletions src/acc/cpu/cpu_benchmark_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,75 @@
#define GTOC(timer,timing)
#define GATHERGPUTIMINGS(timer)

namespace CpuKernels
{
//Non-concurrent benchmarking tools (only for Linux)
/*
//#include <cuda_runtime.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <time.h>
#include <string>
#include <sstream>
#ifdef TIMING_FILES
#define CTIC(timer,timing) (timer.cuda_cpu_tic(timing))
#define CTOC(timer,timing) (timer.cuda_cpu_toc(timing))
#define GTIC(timer,timing) (timer.cuda_gpu_tic(timing))
#define GTOC(timer,timing) (timer.cuda_gpu_toc(timing))
#define GATHERGPUTIMINGS(timer) (timer.cuda_gpu_printtictoc())
#elif defined CUDA_PROFILING
#include <nvToolsExt.h>
#define CTIC(timer,timing) (nvtxRangePush(timing))
#define CTOC(timer,timing) (nvtxRangePop())
#define GTIC(timer,timing)
#define GTOC(timer,timing)
#define GATHERGPUTIMINGS(timer)
#else
#define CTIC(timer,timing)
#define CTOC(timer,timing)
#define GTIC(timer,timing)
#define GTOC(timer,timing)
#define GATHERGPUTIMINGS(timer)
#endif
class relion_timer
{
public:
std::vector<std::string> cuda_cpu_benchmark_identifiers;
std::vector<clock_t> cuda_cpu_benchmark_start_times;
FILE *cuda_cpu_benchmark_fPtr;
std::vector<std::string> cuda_gpu_benchmark_identifiers;
std::vector<cudaEvent_t> cuda_gpu_benchmark_start_times;
std::vector<cudaEvent_t> cuda_gpu_benchmark_stop_times;
FILE *cuda_gpu_benchmark_fPtr;
relion_timer(std::string fnm)
{
std::stringstream fnm_cpu, fnm_gpu;
fnm_cpu << "output/" << fnm << "_cpu.dat";
cuda_cpu_benchmark_fPtr = fopen(fnm_cpu.str().c_str(),"a");
fnm_gpu << "output/" << fnm << "_gpu.dat";
cuda_gpu_benchmark_fPtr = fopen(fnm_gpu.str().c_str(),"a");
}
int cuda_benchmark_find_id(std::string id, std::vector<std::string> v);
void cuda_cpu_tic(std::string id);
void cuda_cpu_toc(std::string id);
void cuda_gpu_tic(std::string id);
void cuda_gpu_toc(std::string id);
void cuda_gpu_printtictoc();
};
*/
}
#endif /* CUDA_BENCHMARK_UTILS_H_ */
3 changes: 0 additions & 3 deletions src/acc/sycl/sycl_kernels/sycl_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ static void complex3D(
imag = dxy0[1] + (dxy1[1] - dxy0[1])*fz;
}

<<<<<<< HEAD
// From https://en.cppreference.com/w/cpp/types/numeric_limits/epsilon
template <typename T>
bool almostEqual(const T x, const T y, const int ulp)
Expand Down Expand Up @@ -285,8 +284,6 @@ static size_t countLargerThanNumber(const T *ptrA, const size_t sz, const T val)
return count;
}

=======
>>>>>>> 609f1ba3d392d15b72be0740227961d6bf6b820c
} // end of namespace syclKernels

#endif //SYCL_UTILITIES_H
1 change: 0 additions & 1 deletion src/gui_jobwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,6 @@ void JobWindow::initialiseDynaMightWindow()
group3->end();
place("do_reconstruct",TOGGLE_REACTIVATE, group3, false);
group3->begin();
place("do_store_deform");
place("backproject_batchsize");
group3->end();

Expand Down
4 changes: 0 additions & 4 deletions src/ml_optimiser.h
Original file line number Diff line number Diff line change
Expand Up @@ -926,13 +926,9 @@ class MlOptimiser
#endif
};

<<<<<<< HEAD
#ifdef _SYCL_ENABLED
~MlOptimiser();
#endif
=======
~MlOptimiser();
>>>>>>> 609f1ba3d392d15b72be0740227961d6bf6b820c

/** ========================== I/O operations =========================== */
/// Print help message
Expand Down
9 changes: 0 additions & 9 deletions src/pipeline_jobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5726,15 +5726,6 @@ bool RelionJob::getCommandsDynaMightJob(std::string &outputname, std::vector<std

}

if (joboptions["do_preload"].getBoolean() && !joboptions["do_visualize"].getBoolean())
command += " --preload-images";

if (joboptions["fn_mask"].getString() != "" && !joboptions["do_inverse"].getBoolean())
command += " --mask-file " + joboptions["fn_mask"].getString();

if (joboptions["fn_checkpoint"].getString() != "")
command += " --checkpoint-file " + joboptions["fn_checkpoint"].getString();

if (joboptions["gpu_id"].getString() != "")
command += " --gpu-id " + joboptions["gpu_id"].getString();

Expand Down

0 comments on commit 81f827a

Please sign in to comment.