mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
This reverts commit 4f2c007a1b.
Reverted https://github.com/pytorch/pytorch/pull/101949 on behalf of https://github.com/osalpekar due to As noted in @izaitsevfb's comment, we are still seeing linker errors, this time due to `nnc_prepacked_linear_clamp_run` being made a static function. ([comment](https://github.com/pytorch/pytorch/pull/101949#issuecomment-1560226880))
30 lines
524 B
C++
30 lines
524 B
C++
#include <torch/csrc/jit/passes/annotate_warns.h>
|
|
|
|
#include <atomic>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
void AnnotateWarns(Block* b) {
|
|
static std::atomic<int64_t> idx(0);
|
|
for (Node* n : b->nodes()) {
|
|
for (Block* child_b : n->blocks()) {
|
|
AnnotateWarns(child_b);
|
|
}
|
|
|
|
if (n->kind() != aten::warn) {
|
|
continue;
|
|
}
|
|
|
|
n->i_(attr::warn_id, idx);
|
|
idx++;
|
|
}
|
|
}
|
|
|
|
void AnnotateWarns(const std::shared_ptr<Graph>& graph) {
|
|
AnnotateWarns(graph->block());
|
|
}
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|