docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
cuda_softmax_data_transfer_extraction.h
Go to the documentation of this file.
1#pragma once
2
3#include <nlohmann/json_fwd.hpp>
4#include <string>
5
13#include "sdfg/types/pointer.h"
14
15namespace sdfg {
16namespace cuda {
17
19private:
20 math::tensor::SoftmaxNode& softmax_node_;
21
22 std::string create_device_container(
24 );
25
26 void create_allocate(
30 const std::string& device_container,
31 const symbolic::Expression& size,
32 const types::Pointer& type
33 );
34
35 void create_deallocate(
39 const std::string& device_container,
40 const types::Pointer& type
41 );
42
43 void create_copy_to_device_with_allocation(
47 const std::string& host_container,
48 const std::string& device_container,
49 const symbolic::Expression& size,
50 const types::Pointer& type
51 );
52
53 void create_copy_from_device_with_deallocation(
57 const std::string& host_container,
58 const std::string& device_container,
59 const symbolic::Expression& size,
60 const types::Pointer& type
61 );
62
63public:
65
66 std::string name() const override;
67
69
71
72 void to_json(nlohmann::json& j) const override;
73};
74
75} // namespace cuda
76} // namespace sdfg
Definition analysis.h:53
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
CUDASoftmaxDataTransferExtraction(math::tensor::SoftmaxNode &softmax_node)
bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be safely applied.
std::string name() const override
Get the name of this transformation.
void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
void to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
Definition softmax_node.h:11
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
A sequential container of control flow nodes.
Definition sequence.h:52
Base class for all SDFG transformations.
Definition transformation.h:25
Represents a pointer type.
Definition pointer.h:32
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
Definition function_builder.h:10
Definition cuda_library_node_rewriter_pass.h:11
Definition analysis.h:7
Pointer type representation.
Symbolic system for integer-based symbol analysis.