-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[ROCm] Implement RNN support #25755
base: main
Are you sure you want to change the base?
[ROCm] Implement RNN support #25755
Conversation
@dfm and @superbobry could you please take a look? |
0b07837
to
36d037e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dfm want to have a look as well?
@jax.default_matmul_precision("float32") | ||
def test_lstm(self, batch_size: int, seq_len: int, input_size: int, | ||
hidden_size: int, num_layers: int, bidirectional: bool): | ||
# TODO(phawkins): Partially disable this on cudnn version per b/281071013 | ||
if (batch_size == 1 and seq_len == 4 and input_size == 1 and | ||
if jtu.is_device_cuda() and (batch_size == 1 and seq_len == 4 and input_size == 1 and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just nuke this condition since JAX requires cuDNN >=9.1.
@@ -61,6 +65,7 @@ def test_lstm(self, batch_size: int, seq_len: int, input_size: int, | |||
weights = rnn.init_lstm_weight(k4, input_size, hidden_size, num_layers, | |||
bidirectional) | |||
def f(weights, x, h_0, c_0): | |||
weights = rnn.swap_lstm_gates(weights, input_size, hidden_size, num_layers, bidirectional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did the test pass without this call before?
Created from: ROCm#171