Skip to content

Commit

Permalink
Fix code style according to lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
phisiart committed Dec 27, 2017
1 parent cdbf01a commit 1473e52
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/codegen/codegen_opengl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,5 @@ void CodeGenOpenGL::VisitExpr_(const StringImm*, std::ostream& os) {
LOG(FATAL) << "GLSL 3.3 doesn't support strings.";
}

} // namespace tvm
} // namespace codegen
} // namespace tvm
2 changes: 1 addition & 1 deletion src/codegen/codegen_opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace codegen {

class CodeGenOpenGL final : public CodeGenC {
public:
explicit CodeGenOpenGL();
CodeGenOpenGL();

void AddFunction(LoweredFunc f);

Expand Down
3 changes: 3 additions & 0 deletions src/runtime/opengl/opengl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#include <dmlc/logging.h>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <string>
#include <utility>
#include <vector>

namespace tvm {
namespace runtime {
Expand Down
11 changes: 7 additions & 4 deletions src/runtime/opengl/opengl_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,12 @@ OpenGLWrappedFunc::OpenGLWrappedFunc(
<< "nargs = " << arg_size_.size() << ", "
<< "nthread_axis_tags = " << thread_axis_tags.size()
<< ")";
for (auto& a: arg_size_) { LOG(INFO) << a; }
for (auto& t: thread_axis_tags) { LOG(INFO) << t; }
for (auto& a : arg_size_) {
LOG(INFO) << a;
}
for (auto& t : thread_axis_tags) {
LOG(INFO) << t;
}

thread_axis_cfg_.Init(arg_size_.size(), thread_axis_tags);
}
Expand All @@ -144,8 +148,7 @@ void OpenGLWrappedFunc::operator()(TVMArgs args, TVMRetValue* rv,
{"A", *static_cast<gl::Texture**>(void_args[1])},
{"B", *static_cast<gl::Texture**>(void_args[2])}
},
*static_cast<gl::Texture**>(void_args[0])
);
*static_cast<gl::Texture**>(void_args[0]));
}

Module OpenGLModuleCreate(std::string data,
Expand Down
2 changes: 1 addition & 1 deletion src/schedule/schedule_lang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ Stage& Stage::opengl() {
CHECK(!is_scheduled()) << "Must be a fresh schedule";
StageNode *self = operator->();

auto all_iter_vars = self->all_iter_vars; // curr version of all_iter_vars
auto all_iter_vars = self->all_iter_vars; // curr version of all_iter_vars
CHECK(!all_iter_vars.empty()) << "At least one iter var";

// Fuse all dimensions to 1.
Expand Down

0 comments on commit 1473e52

Please sign in to comment.