Skip to content

Commit

Permalink
Added ASF header + define macro for the header file: TVM_ARITHMETIC_I…
Browse files Browse the repository at this point in the history
…R_VISITOR_WITH_ANALYZER_H_

Some lint fixes as well.
  • Loading branch information
kimishpatel committed Sep 24, 2019
1 parent 05eae48 commit 5e40764
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
28 changes: 28 additions & 0 deletions src/arithmetic/ir_visitor_with_analyzer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

/*!
* \file tvm/arithmetic/ir_visitor_with_analyzer.h
* \brief IR visitor class with an analyzer context.
*/

#ifndef TVM_ARITHMETIC_IR_VISITOR_WITH_ANALYZER_H_
#define TVM_ARITHMETIC_IR_VISITOR_WITH_ANALYZER_H_

#include <tvm/arithmetic.h>
#include <tvm/ir.h>
#include <tvm/ir_visitor.h>
Expand Down Expand Up @@ -46,3 +73,4 @@ class IRVisitorWithAnalyzer final : public IRVisitor {

} // namespace ir
} // namespace tvm
#endif // TVM_ARITHMETIC_IR_VISITOR_WITH_ANALYZER_H_
6 changes: 3 additions & 3 deletions src/pass/storage_flatten.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class StorageFlattener : public IRMutator {
explicit StorageFlattener(Map<Tensor, Buffer> extern_buffer,
int cache_line_size, bool create_bound_attributes,
const std::shared_ptr<IRVisitorWithAnalyzer>& bounded_analyzer)
: create_bound_attributes_(create_bound_attributes),
bounded_analyzer_(bounded_analyzer) {
: bounded_analyzer_(bounded_analyzer),
create_bound_attributes_(create_bound_attributes) {
for (auto kv : extern_buffer) {
BufferEntry e;
e.buffer = kv.second;
Expand Down Expand Up @@ -537,7 +537,7 @@ Stmt StorageFlatten(Stmt stmt, Map<Tensor, Buffer> extern_buffer,
* or moves data. Perhaps we should disable copy operator and implement
* move operator.
*/
std::shared_ptr<IRVisitorWithAnalyzer> bounded_analyzer=
std::shared_ptr<IRVisitorWithAnalyzer> bounded_analyzer =
std::make_shared<IRVisitorWithAnalyzer>();
bounded_analyzer->Visit(stmt);
stmt =
Expand Down

0 comments on commit 5e40764

Please sign in to comment.