Loading...
Searching...
No Matches
opennn::cudnn_frontend Namespace Reference

Classes

struct  GraphSlot
 

Typedefs

using VariantPack = unordered_map<shared_ptr<graph::Tensor_attributes>, void*>
 

Functions

int device_sm_version ()
 
bool frontend_enabled ()
 
bool frontend_verbose ()
 
bool bn_frontend_enabled ()
 
bool deterministic_algorithms_enabled ()
 
bool conv_energy_autotune_enabled ()
 
float conv_energy_tolerance ()
 
int64_t conv_energy_window_ms ()
 
bool conv_energy_verbose ()
 
bool conv_energy_stage_active ()
 
bool graph_timing_enabled ()
 
profiler::Stats & graph_timing_stats ()
 
template<typename TensorMap>
void execute_graph (graph::Graph &graph, TensorMap &tensors, void *workspace, const string &what, const string &timing_label)
 
void * shared_workspace (int64_t bytes)
 
template<typename GraphCache, typename Body>
bool run_frontend (GraphCache &cache, const char *label, Body &&body)
 
void throw_frontend_unavailable (const string &what)
 
int64_t element_bytes (DataType_t dtype)
 
DataType_t to_dtype (Type t)
 
vector< int64_t > nhwc_strides (int64_t c, int64_t h, int64_t w)
 
shared_ptr< graph::Graph > new_graph (Type dtype=Type::FP32)
 
shared_ptr< graph::Tensor_attributes > nhwc_tensor (graph::Graph &graph, const char *name, int64_t n, int64_t c, int64_t h, int64_t w)
 
void set_nhwc_output (shared_ptr< graph::Tensor_attributes > &tensor, int64_t n, int64_t c, int64_t h, int64_t w)
 
vector< int64_t > bhsd_strides (int64_t h, int64_t s, int64_t d, bool interleaved)
 
shared_ptr< graph::Tensor_attributes > bhsd_tensor (graph::Graph &graph, const char *name, int64_t b, int64_t h, int64_t s, int64_t d, bool interleaved)
 
void set_bhsd_output (shared_ptr< graph::Tensor_attributes > &tensor, int64_t b, int64_t h, int64_t s, int64_t d, bool interleaved)
 
shared_ptr< graph::Tensor_attributes > per_channel_tensor (graph::Graph &graph, const char *name, int64_t channels)
 
void set_per_channel_output (shared_ptr< graph::Tensor_attributes > &tensor, int64_t channels)
 
template<typename... Args>
string timing_label (format_string< Args... > fmt, Args &&... args)
 
shared_ptr< graph::Tensor_attributes > scalar_tensor (graph::Graph &graph, const char *name, DataType_t dtype, bool pass_by_value=false, int64_t batch=1)
 
int64_t candidate_limit_from (long long value)
 
int64_t autotune_candidate_limit ()
 
int64_t autotune_candidate_limit (const string &tag)
 
vector< HeurMode_t > heuristic_modes ()
 
const vector< NumericalNote_t > & conv_engine_notes ()
 
bool build_top_candidates (graph::Graph &graph, int64_t limit)
 
bool plan_cache_enabled ()
 
bool sdpa_autotune_enabled ()
 
int64_t sdpa_workspace_cap_override_bytes ()
 
const std::filesystem::path & plan_cache_directory ()
 
std::filesystem::path plan_cache_file (const graph::Graph &graph)
 
bool load_cached_plan (graph::Graph &graph, const cudnnHandle_t handle, int64_t &workspace_bytes)
 
void store_cached_plan (graph::Graph &graph)
 
int64_t autotune_workspace_bytes (const graph::Graph &graph)
 
int64_t sdpa_workspace_cap_bytes (int64_t batch, int64_t heads, int64_t q_seq, int64_t src_seq, int64_t head_dim)
 
bool finalize_attention (graph::Graph &graph, const string &tag, int64_t &workspace_bytes, bool allow_autotune=false, int64_t workspace_cap=0)
 
shared_ptr< graph::Tensor_attributes > seq_len_scalar (graph::Graph &graph, const char *name, int64_t batch=1)
 
bool finalize (graph::Graph &graph, int64_t &workspace_bytes, const string &tag, const bool fp32_graph=false)
 
void report_autotune_skipped (const char *tag, const char *reason)
 
bool is_convolution_tag (const char *tag)
 
template<typename TensorMap>
void select_plan_by_energy (graph::Graph &graph, TensorMap &tensors, void *workspace, const char *tag)
 
template<typename TensorMap>
void autotune_now (bool &pending, graph::Graph &graph, TensorMap &tensors, int64_t &workspace_bytes, const char *tag=nullptr)
 
template<typename TensorMap>
void autotune_with_scratch (bool &pending, graph::Graph &graph, const TensorMap &tensors, int64_t &workspace_bytes, const char *tag=nullptr)
 
template<typename TensorMap>
void run_slot (GraphSlot &slot, TensorMap &tensors, const char *what, const string &timing_label, bool scratch_autotune)
 

Variables

constexpr size_t graph_cache_capacity = 8
 
const auto check_status
 

Typedef Documentation

◆ VariantPack

using opennn::cudnn_frontend::VariantPack = unordered_map<shared_ptr<graph::Tensor_attributes>, void*>

Function Documentation

◆ autotune_candidate_limit() [1/2]

int64_t opennn::cudnn_frontend::autotune_candidate_limit ( )
inline

◆ autotune_candidate_limit() [2/2]

int64_t opennn::cudnn_frontend::autotune_candidate_limit ( const string & tag)
inline

◆ autotune_now()

template<typename TensorMap>
void opennn::cudnn_frontend::autotune_now ( bool & pending,
graph::Graph & graph,
TensorMap & tensors,
int64_t & workspace_bytes,
const char * tag = nullptr )
inline

◆ autotune_with_scratch()

template<typename TensorMap>
void opennn::cudnn_frontend::autotune_with_scratch ( bool & pending,
graph::Graph & graph,
const TensorMap & tensors,
int64_t & workspace_bytes,
const char * tag = nullptr )
inline

◆ autotune_workspace_bytes()

int64_t opennn::cudnn_frontend::autotune_workspace_bytes ( const graph::Graph & graph)
inline

◆ bhsd_strides()

vector< int64_t > opennn::cudnn_frontend::bhsd_strides ( int64_t h,
int64_t s,
int64_t d,
bool interleaved )
inline

◆ bhsd_tensor()

shared_ptr< graph::Tensor_attributes > opennn::cudnn_frontend::bhsd_tensor ( graph::Graph & graph,
const char * name,
int64_t b,
int64_t h,
int64_t s,
int64_t d,
bool interleaved )
inline

◆ bn_frontend_enabled()

bool opennn::cudnn_frontend::bn_frontend_enabled ( )
inline

◆ build_top_candidates()

bool opennn::cudnn_frontend::build_top_candidates ( graph::Graph & graph,
int64_t limit )
inline

◆ candidate_limit_from()

int64_t opennn::cudnn_frontend::candidate_limit_from ( long long value)
inline

◆ conv_energy_autotune_enabled()

bool opennn::cudnn_frontend::conv_energy_autotune_enabled ( )
inline

◆ conv_energy_stage_active()

bool opennn::cudnn_frontend::conv_energy_stage_active ( )
inline

◆ conv_energy_tolerance()

float opennn::cudnn_frontend::conv_energy_tolerance ( )
inline

◆ conv_energy_verbose()

bool opennn::cudnn_frontend::conv_energy_verbose ( )
inline

◆ conv_energy_window_ms()

int64_t opennn::cudnn_frontend::conv_energy_window_ms ( )
inline

◆ conv_engine_notes()

const vector< NumericalNote_t > & opennn::cudnn_frontend::conv_engine_notes ( )
inline

◆ deterministic_algorithms_enabled()

bool opennn::cudnn_frontend::deterministic_algorithms_enabled ( )
inline

◆ device_sm_version()

int opennn::cudnn_frontend::device_sm_version ( )
inline

◆ element_bytes()

int64_t opennn::cudnn_frontend::element_bytes ( DataType_t dtype)
inline

◆ execute_graph()

template<typename TensorMap>
void opennn::cudnn_frontend::execute_graph ( graph::Graph & graph,
TensorMap & tensors,
void * workspace,
const string & what,
const string & timing_label )
inline

◆ finalize()

bool opennn::cudnn_frontend::finalize ( graph::Graph & graph,
int64_t & workspace_bytes,
const string & tag,
const bool fp32_graph = false )
inline

◆ finalize_attention()

bool opennn::cudnn_frontend::finalize_attention ( graph::Graph & graph,
const string & tag,
int64_t & workspace_bytes,
bool allow_autotune = false,
int64_t workspace_cap = 0 )
inline

◆ frontend_enabled()

bool opennn::cudnn_frontend::frontend_enabled ( )
inline

◆ frontend_verbose()

bool opennn::cudnn_frontend::frontend_verbose ( )
inline

◆ graph_timing_enabled()

bool opennn::cudnn_frontend::graph_timing_enabled ( )
inline

◆ graph_timing_stats()

profiler::Stats & opennn::cudnn_frontend::graph_timing_stats ( )
inline

◆ heuristic_modes()

vector< HeurMode_t > opennn::cudnn_frontend::heuristic_modes ( )
inline

◆ is_convolution_tag()

bool opennn::cudnn_frontend::is_convolution_tag ( const char * tag)
inline

◆ load_cached_plan()

bool opennn::cudnn_frontend::load_cached_plan ( graph::Graph & graph,
const cudnnHandle_t handle,
int64_t & workspace_bytes )
inline

◆ new_graph()

shared_ptr< graph::Graph > opennn::cudnn_frontend::new_graph ( Type dtype = Type::FP32)
inline

◆ nhwc_strides()

vector< int64_t > opennn::cudnn_frontend::nhwc_strides ( int64_t c,
int64_t h,
int64_t w )
inline

◆ nhwc_tensor()

shared_ptr< graph::Tensor_attributes > opennn::cudnn_frontend::nhwc_tensor ( graph::Graph & graph,
const char * name,
int64_t n,
int64_t c,
int64_t h,
int64_t w )
inline

◆ per_channel_tensor()

shared_ptr< graph::Tensor_attributes > opennn::cudnn_frontend::per_channel_tensor ( graph::Graph & graph,
const char * name,
int64_t channels )
inline

◆ plan_cache_directory()

const std::filesystem::path & opennn::cudnn_frontend::plan_cache_directory ( )
inline

◆ plan_cache_enabled()

bool opennn::cudnn_frontend::plan_cache_enabled ( )
inline

◆ plan_cache_file()

std::filesystem::path opennn::cudnn_frontend::plan_cache_file ( const graph::Graph & graph)
inline

◆ report_autotune_skipped()

void opennn::cudnn_frontend::report_autotune_skipped ( const char * tag,
const char * reason )
inline

◆ run_frontend()

template<typename GraphCache, typename Body>
bool opennn::cudnn_frontend::run_frontend ( GraphCache & cache,
const char * label,
Body && body )

◆ run_slot()

template<typename TensorMap>
void opennn::cudnn_frontend::run_slot ( GraphSlot & slot,
TensorMap & tensors,
const char * what,
const string & timing_label,
bool scratch_autotune )
inline

◆ scalar_tensor()

shared_ptr< graph::Tensor_attributes > opennn::cudnn_frontend::scalar_tensor ( graph::Graph & graph,
const char * name,
DataType_t dtype,
bool pass_by_value = false,
int64_t batch = 1 )
inline

◆ sdpa_autotune_enabled()

bool opennn::cudnn_frontend::sdpa_autotune_enabled ( )
inline

◆ sdpa_workspace_cap_bytes()

int64_t opennn::cudnn_frontend::sdpa_workspace_cap_bytes ( int64_t batch,
int64_t heads,
int64_t q_seq,
int64_t src_seq,
int64_t head_dim )
inline

◆ sdpa_workspace_cap_override_bytes()

int64_t opennn::cudnn_frontend::sdpa_workspace_cap_override_bytes ( )
inline

◆ select_plan_by_energy()

template<typename TensorMap>
void opennn::cudnn_frontend::select_plan_by_energy ( graph::Graph & graph,
TensorMap & tensors,
void * workspace,
const char * tag )
inline

◆ seq_len_scalar()

shared_ptr< graph::Tensor_attributes > opennn::cudnn_frontend::seq_len_scalar ( graph::Graph & graph,
const char * name,
int64_t batch = 1 )
inline

◆ set_bhsd_output()

void opennn::cudnn_frontend::set_bhsd_output ( shared_ptr< graph::Tensor_attributes > & tensor,
int64_t b,
int64_t h,
int64_t s,
int64_t d,
bool interleaved )
inline

◆ set_nhwc_output()

void opennn::cudnn_frontend::set_nhwc_output ( shared_ptr< graph::Tensor_attributes > & tensor,
int64_t n,
int64_t c,
int64_t h,
int64_t w )
inline

◆ set_per_channel_output()

void opennn::cudnn_frontend::set_per_channel_output ( shared_ptr< graph::Tensor_attributes > & tensor,
int64_t channels )
inline

◆ shared_workspace()

void * opennn::cudnn_frontend::shared_workspace ( int64_t bytes)
inline

◆ store_cached_plan()

void opennn::cudnn_frontend::store_cached_plan ( graph::Graph & graph)
inline

◆ throw_frontend_unavailable()

void opennn::cudnn_frontend::throw_frontend_unavailable ( const string & what)
inline

◆ timing_label()

template<typename... Args>
string opennn::cudnn_frontend::timing_label ( format_string< Args... > fmt,
Args &&... args )
inline

◆ to_dtype()

DataType_t opennn::cudnn_frontend::to_dtype ( Type t)
inline

Variable Documentation

◆ check_status

const auto opennn::cudnn_frontend::check_status
inline
Initial value:
= [](auto status, const string& what) {
throw_if(status.is_bad(),
"cudnn-frontend {}: {}", what, status.get_message());
}
#define throw_if(condition,...)
Definition opennn_types.h:243

◆ graph_cache_capacity

size_t opennn::cudnn_frontend::graph_cache_capacity = 8
inlineconstexpr