mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: The PR clang-formats everything in `torch/csrc/jit/` and adds it to the pre-commit hook. Here is a list of non-mechanical changes: - I went over each file and fixed up whenever I could tell that clang-format was clobbering comment formatting. - Made the macros in register_prim_ops a little more clang-format friendly by omitting trailing commas - Refactored autodiff.cpp to use a helper class with explicit state rather than a bunch of capturing lambdas - Small improvements to the precommit hook clang-format Pull Request resolved: https://github.com/pytorch/pytorch/pull/15524 Differential Revision: D13547989 Pulled By: suo fbshipit-source-id: 3ff1541bb06433ccfe6de6e33f29227a2b5bb493
18 lines
267 B
C++
18 lines
267 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/jit/ir.h>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
struct HashNode {
|
|
size_t operator()(const Node* k) const;
|
|
};
|
|
|
|
struct EqualNode {
|
|
bool operator()(const Node* lhs, const Node* rhs) const;
|
|
};
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|