nx_vocops.nx
buildroot/runtime/nx_vocops.nx
about
nx_vocops.nx -- the SOVEREIGN NEURAL-VOCODER OP LIBRARY (no main; imported by the HiFi-GAN generator forward).
Consolidates the 1-D neural ops verified as standalone bricks (supersedes nx_conv1d.nx + nx_conv_transpose1d.nx):
conv1d -- dilated 1-D convolution (conv_pre, MRF, conv_post)
conv_transpose1d -- the upsampler (ConvTranspose1d), 4 stages mel->audio-rate
leaky_relu -- the activation every conv is wrapped in (HiFi-GAN slope 0.1)
resblock1_1dil -- ONE dilation branch of a HiFi-GAN ResBlock: x + conv(leaky(conv(leaky(x)))) (residual)
Same f32/SSE substrate as the FIXED Qwen forward. Tested byte-exact by nx_vocops_test. license_tier: ORIGINAL
dependencies 4 imports · 5 importers
imports: nx_syscalls.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nx
imported by: nx_hifigan_gen.nxnx_hifigan_load.nxnx_hifigan_run.nxnx_hifigan_verify.nxnx_vocops_test.nx
structs
| none |
consts
| none |
functions
| 15 | func conv1d(inp: *i64, w: *i64, b: *i64, out: *i64, |
| 43 | func conv_transpose1d(inp: *i64, w: *i64, b: *i64, out: *i64, |
| 71 | func leaky_relu(x: i64, slope: i64) -> i64 { if ((x>>31)&1)==1 { return nx_f32_mul(x, slope) } return x } |
| 72 | func leaky_relu_vec(v: *i64, n: i64, slope: i64) -> i64 { var i: i64=0; while i<n { v[i]=leaky_relu(v[i], slope); i=i+1 } return 0 } |
| 78 | func weight_norm_apply(v: *i64, g: *i64, w_out: *i64, C_out: i64, inner: i64) -> i64 |
| 96 | func resblock1_1dil(x: *i64, w1: *i64, b1: *i64, w2: *i64, b2: *i64, out: *i64, |