Skip to content

Commit

Permalink
Rewrite the CHIRP model code so it can be lowered to a supported Stab…
Browse files Browse the repository at this point in the history
…leHLO/MHLO IR.

PiperOrigin-RevId: 723162070
  • Loading branch information
vamsimanchala authored and copybara-github committed Feb 4, 2025
1 parent 827f0e1 commit 1a49cfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion chirp/audio_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ def ema_conv1d(
if conv_width == -1:
conv_width = xs.shape[1]

left_pad = jnp.repeat(xs[:, 0:1], conv_width - 1, axis=1)
xs_slice = lax.slice(xs, (0, 0, 0), (xs.shape[0], 1, xs.shape[2]), (1, 1, 1))
left_pad = jnp.repeat(xs_slice, conv_width - 1, axis=1)
padded_inp = jnp.concatenate([left_pad, xs], axis=1)

kernel = jnp.array(
Expand Down
7 changes: 0 additions & 7 deletions chirp/train_tests/frontend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,6 @@ def test_inverse(self, module_type, inverse_module_type, module_kwargs):
"kernel_size": 64,
},
},
{
"module_type": frontend.ISTFT,
"module_kwargs": {
"stride": 64,
},
"signal_shape": (1, 25, 64),
},
{
"module_type": frontend.InverseLearnedFrontend,
"module_kwargs": {
Expand Down

0 comments on commit 1a49cfb

Please sign in to comment.