1 /* 2 * Copyright (c) Qualcomm Innovation Center, Inc. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 #pragma once 9 #include <executorch/backends/qualcomm/runtime/backends/QnnBackendCache.h> 10 11 namespace executorch { 12 namespace backends { 13 namespace qnn { 14 class HtpBackendCache : public QnnBackendCache { 15 public: HtpBackendCache(const QnnExecuTorchContextBinary & qnn_context_blob,const std::string & aot_graph_name)16 explicit HtpBackendCache( 17 const QnnExecuTorchContextBinary& qnn_context_blob, 18 const std::string& aot_graph_name) 19 : QnnBackendCache(qnn_context_blob, aot_graph_name), spill_fill_buf_(0) {} 20 ~HtpBackendCache() override = default; 21 GetSpillFillBufferSize()22 uint64_t GetSpillFillBufferSize() { 23 return spill_fill_buf_; 24 } 25 26 protected: 27 executorch::runtime::Error RetrieveBackendBinaryInfo( 28 const QnnSystemContext_BinaryInfo_t* binaryinfo) override; 29 30 private: 31 uint64_t spill_fill_buf_; 32 }; 33 } // namespace qnn 34 } // namespace backends 35 } // namespace executorch 36