Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions src/base/ormqr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#ifndef INFINI_OPS_BASE_ORMQR_H_
#define INFINI_OPS_BASE_ORMQR_H_

#include "operator.h"

namespace infini::ops {

class Ormqr : public Operator<Ormqr> {
public:
Ormqr(const Tensor input, const Tensor tau, const Tensor other,
const bool left, const bool transpose, Tensor out)
: input_shape_{input.shape()},
input_strides_{input.strides()},
input_type_{input.dtype()},
tau_shape_{tau.shape()},
tau_strides_{tau.strides()},
tau_type_{tau.dtype()},
other_shape_{other.shape()},
other_strides_{other.strides()},
other_type_{other.dtype()},
out_shape_{out.shape()},
out_strides_{out.strides()},
out_type_{out.dtype()},
left_{left},
transpose_{transpose},
device_index_{out.device().index()} {}

virtual void operator()(const Tensor input, const Tensor tau,
const Tensor other, const bool left,
const bool transpose, Tensor out) const = 0;

protected:
Tensor::Shape input_shape_;

Tensor::Strides input_strides_;

DataType input_type_;

Tensor::Shape tau_shape_;

Tensor::Strides tau_strides_;

DataType tau_type_;

Tensor::Shape other_shape_;

Tensor::Strides other_strides_;

DataType other_type_;

Tensor::Shape out_shape_;

Tensor::Strides out_strides_;

DataType out_type_;

bool left_{};

bool transpose_{};

int device_index_{0};
};

} // namespace infini::ops

#endif
Loading