Skip to content

Commit

Permalink
Temporary support for PyTorch 2.1 (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaochaoxing authored Nov 3, 2023
1 parent 3ac9fdd commit 8dac466
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dipu/torch_dipu/csrc_dipu/runtime/core/DIPUGeneratorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class DIPUGeneratorImpl : public c10::GeneratorImpl {
uint64_t seed() override;
static at::DeviceType device_type();
c10::intrusive_ptr<c10::TensorImpl> get_state() const override;
virtual void set_state(const c10::TensorImpl& state) {}
virtual void set_state(const c10::TensorImpl& state) {};
virtual void set_offset(uint64_t offset) {};
virtual uint64_t get_offset() const {return 0;};

protected:
void set_state_flag(bool flag);
Expand Down

0 comments on commit 8dac466

Please sign in to comment.