Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement lowering of torch.aten.exponential to linalg. #2646

Closed
godot73 opened this issue Dec 14, 2023 · 1 comment
Closed

Implement lowering of torch.aten.exponential to linalg. #2646

godot73 opened this issue Dec 14, 2023 · 1 comment
Assignees

Comments

@godot73
Copy link
Collaborator

godot73 commented Dec 14, 2023

torch.aten.exponential is in the op-to-implement list.

@godot73
Copy link
Collaborator Author

godot73 commented Dec 20, 2023

High-level direction:

When x is sampled from uniform(0, 1), f(x) := - ln(1-x)/lambda produces exponentially distributed random variables. Thus, we can lower torch.aten.exponential(x, lambda) by decomposing it into:

%one_minus_x = sub(%one - x)
%log_one_minus_x = log(%one_minus_x)
%neg_log_one_minus_x = neg(%log_one_minus_x)
%result = sub(%neg_log_one_minus_x, %lambda)

@renxida renxida unpinned this issue Dec 27, 2023
stellaraccident pushed a commit that referenced this issue Dec 28, 2023
#2646

Decompose aten.exponential() into: -exp(1-x)/lambda
@godot73 godot73 closed this as completed Dec 28, 2023
renxida pushed a commit to renxida/torch-mlir that referenced this issue Dec 28, 2023
llvm#2646

Decompose aten.exponential() into: -exp(1-x)/lambda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants