codegen_vhls.h 1.51 KB
Newer Older
1 2 3 4 5 6 7 8
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
9
 *
10
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *
12 13 14 15 16 17 18 19
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

20 21 22 23
/*!
 * \file codegen_vhls.h
 * \brief Utility to generate vhls code
 */
24 25
#ifndef TVM_TARGET_SOURCE_CODEGEN_VHLS_H_
#define TVM_TARGET_SOURCE_CODEGEN_VHLS_H_
26

27 28
#include <tvm/target/codegen.h>
#include <tvm/target/target.h>
29
#include <tvm/tir/expr.h>
30
#include <string>
31
#include "codegen_c.h"
32 33 34 35 36 37 38

namespace tvm {
namespace codegen {

class CodeGenVivadoHLS final : public CodeGenC {
 public:
  void Init(bool output_ssa);
39
  void PrintType(DataType t, std::ostream& os);
40 41
  void AddFunction(LoweredFunc f);
  void PreFunctionBody(LoweredFunc f);
42 43
  void VisitExpr_(const MinNode *op, std::ostream& os);
  void VisitExpr_(const MaxNode *op, std::ostream& os);
44 45 46 47 48
};

}  // namespace codegen
}  // namespace tvm

49
#endif  // TVM_TARGET_SOURCE_CODEGEN_VHLS_H_