mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
integrated optional (experimentl) CLBlast support
This commit is contained in:
parent
c9f18082fd
commit
23c675b2e6
53 changed files with 22095 additions and 151 deletions
21
CL/Utils/Event.hpp
Normal file
21
CL/Utils/Event.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
// OpenCL SDK includes
|
||||
#include "OpenCLUtilsCpp_Export.h"
|
||||
|
||||
// STL includes
|
||||
#include <chrono>
|
||||
|
||||
// OpenCL includes
|
||||
#include <CL/opencl.hpp>
|
||||
|
||||
namespace cl {
|
||||
namespace util {
|
||||
template <cl_int From, cl_int To, typename Dur = std::chrono::nanoseconds>
|
||||
auto get_duration(cl::Event& ev)
|
||||
{
|
||||
return std::chrono::duration_cast<Dur>(std::chrono::nanoseconds{
|
||||
ev.getProfilingInfo<To>() - ev.getProfilingInfo<From>() });
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue