MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AlgorithmDesc

Class AlgorithmDesc

tensorflow/stream_executor/dnn.h:799–822  ·  view source on GitHub ↗

Collects parameters for DNN algorithms

Source from the content-addressed store, hash-verified

797
798// Collects parameters for DNN algorithms
799class AlgorithmDesc {
800 public:
801 typedef int64 Index;
802 AlgorithmDesc() : AlgorithmDesc(0, false) {}
803 AlgorithmDesc(Index a, bool use_tensor_ops) {
804 proto_.set_algo_id(a);
805 proto_.set_math_type(use_tensor_ops ? AlgorithmProto::TENSOR_OP_MATH
806 : AlgorithmProto::DEFAULT_MATH);
807 }
808 bool tensor_ops_enabled() const {
809 return proto_.math_type() == AlgorithmProto::TENSOR_OP_MATH;
810 }
811 Index algo_id() const { return proto_.algo_id(); }
812 bool operator==(const AlgorithmDesc& other) const {
813 return algo_id() == other.algo_id() &&
814 tensor_ops_enabled() == other.tensor_ops_enabled();
815 }
816 uint64 hash() const;
817
818 AlgorithmProto ToProto() const { return proto_; }
819
820 private:
821 AlgorithmProto proto_;
822};
823
824// Collects parameters for DNN execution plans
825class ExecutionPlanDesc {

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.40