Skip to content

Commit

Permalink
Create scan.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai authored Jan 17, 2024
1 parent bfd7d84 commit 07b345e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions torch_xla/csrc/ops/scan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef XLA_TORCH_XLA_CSRC_OPS_NATIVE_DROPOUT_H_
#define XLA_TORCH_XLA_CSRC_OPS_NATIVE_DROPOUT_H_

#include "torch_xla/csrc/ir.h"

namespace torch_xla {

// This node has no metadata, so it could have been implemented as generic-op in
// ops.cpp, but since this might require special handling from upper IR layers,
// it gets its own IR node class.
class Scan : public XlaNode {
public:
Map(const Callable f, const at::Tensor& init, const at::Tensor& xs);

torch::lazy::NodePtr Clone(torch::lazy::OpList operands) const override;

XlaOpVector Lower(LoweringContext* loctx) const override;
};

} // namespace torch_xla

#endif // XLA_TORCH_XLA_CSRC_OPS_NATIVE_DROPOUT_H_

0 comments on commit 07b345e

Please sign in to comment.