Skip to content

[PT_BREAK] clamp with min and max as tensor #2899

@JackCaoG

Description

@JackCaoG

In pytorch/pytorch#52695 pytorch added a new signature for clamp

static at::Tensor clamp(const at::Tensor & self, const c10::optional<at::Tensor> & min, const c10::optional<at::Tensor> & max);

Pytorch / XLA already supported

static at::Tensor clamp(const at::Tensor & self, const c10::optional<at::Scalar> & min, const c10::optional<at::Scalar> & max);

and we generate clamp_out based on our implementation of the clamp. Since the new signature is added, gen script will try to generate the out_fn but it failed to find the corresponding base kernel.

The workaround would be remove the clamp_out from the gen script but that will make clamp_out with scalar fallback to cpu. I will look into lower the clamp with min and max as tensor.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions