Archived
libref, libavx, libr4d: conv1d's stride and cu_div, and vq_encode -- a causal codec encoder's downsampling (the left pad the reach less the stride, every sequence a whole number of strides, the bounds read in samples at every rate) and one step of its residual quantiser, the code of greatest cosine and the residual it leaves (Fish Audio's codec encoding a reference)
This commit is contained in:
1 parent
00f9703892
commit
4e750fed01
15 files changed
+673
-110
No files matched your search
@@ -954,6 +954,13 @@ std::vector<Case> build_cases() {
|
||||
for (int dil : { 1, 3 })
|
||||
add("conv1d", { HI("M", 24), HI("cin", 20), HI("cout", 13), HI("k", 7),
|
||||
HI("dil", dil), HI("causal", 1), HS("dtype", dt) });
|
||||
/* Strided, causal: Fish Audio's codec encoder downsamples with kernels of two strides
|
||||
* (2, 4, 8) and its quantiser with a kernel of one (k 2, stride 2). */
|
||||
for (int s : { 2, 4, 8 })
|
||||
add("conv1d", { HI("M", 64), HI("cin", 20), HI("cout", 13), HI("k", 2 * s),
|
||||
HI("dil", 1), HI("causal", 1), HI("stride", s), HS("dtype", dt) });
|
||||
add("conv1d", { HI("M", 64), HI("cin", 24), HI("cout", 16), HI("k", 2), HI("dil", 1),
|
||||
HI("causal", 1), HI("stride", 2), HS("dtype", dt) });
|
||||
for (int s : { 2, 4, 8 })
|
||||
add("conv_t1d", { HI("M", 12), HI("cin", 20), HI("cout", 13), HI("stride", s),
|
||||
HS("dtype", dt) });
|
||||
@@ -1050,6 +1057,16 @@ std::vector<Case> build_cases() {
|
||||
add("ras_pick", { HI("M", 4), HI("win", 16), HI("lo", 1), HI("hi", 9), HI("rep", 1) });
|
||||
add("ras_pick", { HI("M", 2), HI("win", 4), HI("lo", 0), HI("hi", 12), HI("rep", 2),
|
||||
HI("clear", 1) });
|
||||
/* A codec encoder's residual quantiser step: DAC's eight-wide codes over a semantic codebook
|
||||
* and a residual one, both dtypes; a dimension that is no vector's width. */
|
||||
for (const char* dt : { "f32", "bf16" }) {
|
||||
add("vq_encode", { HI("M", 7), HI("n", 64), HI("dim", 8), HI("bins", 4096),
|
||||
HS("dtype", dt) });
|
||||
add("vq_encode", { HI("M", 5), HI("n", 128), HI("dim", 8), HI("bins", 1024),
|
||||
HS("dtype", dt) });
|
||||
}
|
||||
add("vq_encode", { HI("M", 3), HI("n", 40), HI("dim", 5), HI("bins", 33),
|
||||
HS("dtype", "f32") });
|
||||
add("frame_store", { HI("M", 2), HI("n_codes", 16), HI("stride", 9), HI("rep", 2),
|
||||
HI("skip", 0) });
|
||||
add("frame_store", { HI("M", 4), HI("n_codes", 3), HI("stride", 5), HI("rep", 1),
|
||||
|
||||
Reference in new issue
Block a user