#include "/opt/MagAOX/vendor/TensorRT-10.0.0.6/include/NvInfer.h"
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstring>
#include <cuda_runtime_api.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ratio>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
Go to the source code of this file.
|
bool | doesFileExist (const std::string &filepath) |
|
void | parseCSV (std::string filepath, float *fileData) |
|
std::string | locateFile (const std::string &filepathSuffix, const std::vector< std::string > &directories, bool reportError=true) |
|
void | enableDLA (nvinfer1::IBuilder *builder, nvinfer1::IBuilderConfig *config, int useDLACore, bool allowGPUFallback=true) |
|
std::unique_ptr< cudaStream_t, decltype(StreamDeleter)> | makeCudaStream () |
|
◆ doesFileExist()
bool doesFileExist |
( |
const std::string & |
filepath | ) |
|
|
inline |
◆ enableDLA()
void enableDLA |
( |
nvinfer1::IBuilder * |
builder, |
|
|
nvinfer1::IBuilderConfig * |
config, |
|
|
int |
useDLACore, |
|
|
bool |
allowGPUFallback = true |
|
) |
| |
|
inline |
◆ locateFile()
std::string locateFile |
( |
const std::string & |
filepathSuffix, |
|
|
const std::vector< std::string > & |
directories, |
|
|
bool |
reportError = true |
|
) |
| |
|
inline |
Locate path to file, given its filename or filepath suffix and possible dirs it might lie in. Function will also walk back MAX_DEPTH dirs from CWD to check for such a file path.
Definition at line 85 of file util.hpp.
Referenced by TensorRTEngine::constructNetwork().
◆ makeCudaStream()
std::unique_ptr< cudaStream_t, decltype(StreamDeleter)> makeCudaStream |
( |
| ) |
|
◆ parseCSV()
void parseCSV |
( |
std::string |
filepath, |
|
|
float * |
fileData |
|
) |
| |
|
inline |
◆ StreamDeleter
Initial value:= [](cudaStream_t* pStream) {
if (pStream)
{
static_cast<void>(cudaStreamDestroy(*pStream));
delete pStream;
}
}
Definition at line 180 of file util.hpp.
Referenced by makeCudaStream().