Article View: comp.arch
Article #802Re: vector length CSR?
From: BGB
Date: Tue, 17 Nov 2026 23:40
Date: Tue, 17 Nov 2026 23:40
153 lines
8316 bytes
8316 bytes
On 11/17/2026 2:57 PM, MitchAlsup wrote: > George Neuner <gneuner2@comcast.net> posted: > >> On Fri, 13 Nov 2026 15:19:04 +0100, Terje Mathisen >> <terje.mathisen@tmsw.no> wrote: >> >>> George Neuner wrote: >>>> WRT the Mill, I think people here may be missing that it supported >>>> short-vector-SIMD, and that a vector operand on its belt was a single >>>> element [of whatever width] - not a bunch of scalars that magically >>>> would be operated on together. >>> >>> Yes and no, see below. >>>> >>>> According to Ivan, the Mill's instruction set supported quad FP and >>>> 128-bit short vector SIMD. >>>> [Similar width as Intel's SSE2, though SSE_ doesn't do quad FP.] >>>> >>>> He spoke about the potential for [more lanes] wider SIMD and made >>>> clear that, whatever widths were supported, the "operands" still would >>>> be treated as single belt elements. >>>> >>> The real magic sauce is the fact that belt operands carries metadata, >>> including not just byte/short/int/long/float/double/etc designators, but >>> also a vector vs scalar boolean, as well as None and NAR (Not A Result, >>> similar to NaN but even more powerful). >>> >>> This means that Mill only needs a single ADD instruction, it >>> automagically handles vector/scalar/multiple element sizes based on >>> those metadata bits. >>> >>> If you want to treat 16 bytes, loaded as 16 unsigned bytes, as if they >>> were 8 int16_t's, then you need to convert the entry. >> >> Yes, but not what I was referring to. >> >> I'm paraphrasing, but Ivan said that if someone wanted [to pay for] a >> Mill with, e.g., multiple 1024-bit SIMD units, he'd be happy to give >> it to them. >> >> He also said "the belt holds operands" - more or less a direct quote - >> and we know the belt basically is a set of dynamically renamed latch >> registers, that means that: if there are 1024-bit wide vector units, >> then there must be 1024-bit wide operand values. > > Minor quibble: if you have 1024-bit wide SIMD units, you need a way to > read and write 1024-bits as operands and results. This does NOT end up > using 1024-bit registers, necessarily. Yes. Can note that I am typically doing 128-bit SIMD and ALU ops with 64-bit registers. Theoretically, the current approach could be extended to 256-bits, though if taking my originally imagined approach would incur a penalty for 64-bit usage (which would then be faking 64-bit operations via 3R1W patterns on 128-bit register ports); and would imply likely needing to expand the register file as 64x 64-bit GPRs wouldn't go very far when the occasional 256-bit operation is thrown in the mix. Don't claim that it cleanly scales up though, as my design was built fairly explicitly on the assumption that this stuff either doesn't really scale, or that one switches to a dedicated wider-vector SIMD approach (more like RV-V or similar) when needed (but, that I will wager that most code will not need this, most of the time; even when the HW has the capability to do so). Well, in other news, my experiments with Cinepak-style VQ video compression are now going better than initial results suggested: Very early experiments: "Meh, this is kinda going to suck". More recent: It is beating my other designs and can do 720p and 1080p video at ~ 1 Mbps and not totally fall on its face. While decoding isn't as fast as some of my color-cell codecs, it isn't too bad either. Can give better image quality and better Q/bpp. It is also beating out my prior experiment of "try to use my UPIC format as a makeshift H.261 style video codec" (which worked OK for 360p at 1 Mbps; fell on its face for 720p). Granted, UPIC was mostly meant as a "cheaper to decode but more capable JPEG alternative" (wanted the option for lossless, and an alpha channel; also needed to be faster to decode than JPEG and PNG; ...). Most other modern "JPEG replacements" had more focused on compression, rather than cases where it was too slow. My current codec experiment could be useful as a lossy image codec as well (also falls into the "faster than JPEG" bucket); though would need to come up with some reasonable way to encode an alpha channel. Current design doesn't address this; could use another luma-only sub-image to encode an Alpha layer, but this is lame. Likely alternatives being to encode it as special blocks (similar to skip handling) or as a special out-of-gamut color. Well, and 1080p video decoding uses reasonably modest CPU power for a single-threaded decoder. Not tested 2160p yet. Theoretically the codec can handle this in isolation, but also this is likely pushing it for actual playback. Can also note that "Media Player Classic" in the case of 1080p video, while mostly staying under 1% CPU (where the decode is happening), is apparently pushing like 30% on the GPU to actually get the frames displayed. Well, now encoding an experiment where it up-scales the video to 4K as a test so I can see whether the playback handles it. It is going to be a little while though, as my encoder isn't exactly all that fast... What is has in decode speed is paid for in a painfully slow encoder (a faster encoder could be possible, but then Q/bpp would basically be horrible if one is mostly just using it for pushing minimally quantized YUV data or similar). Most of the compression magic depends on "codebooks", but the process of codebook lookups, or encode time curation of blocks to "pre-warm" the state for P-Frames, isn't particularly fast. Well, came up with a trick to improve compression some: During encoding it keeps track of which codebook patterns are used most frequently (say, tracking the top 16K patterns or so), and then during each I-Frame it emits a "prolog" blob that is decoded prior to the main image data for the frame, which mostly contains a bunch of the most commonly used codebook patterns (selecting the top 1K patterns). This adds a little cost to the I-Frame, but generally allows making the P-Frames cheaper, without having too much impact on decode speed, by allowing the P-Frame to reference previously seen patterns rather than have to re-encode them every frame. So, in this case, for a 4K frame the encoder is currently going along at roughly 1 frame per second. (time skip) Well, took a while to encode, but seems like, yes, 4K video playback works with a single-threaded decoder via VFW. ... >> >> And, of course, also operands of whatever other widths are supported. >> >> >>> Terje >>> >>> PS. Expect to see Mill return to being generally visible in the near future.
Technical Details
Message-ID:
<11diol0$s9f8$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me> <11crh64$ug0s$1@dont-email.me> <11crili$ur2d$1@dont-email.me> <11crrs5$118ll$1@dont-email.me> <11crsp0$11gka$1@dont-email.me> <YQsIS.6524$wY2.2685@fx24.iad> <2026Nov10.100317@mips.complang.tuwien.ac.at> <gq0dflh8afjsm6u6jqqihfd047eb7n1mu1@4ax.com> <11d768o$t2b3$1@dont-email.me> <dn9pfl5lj8pqh0cqb4lhb5dbdt5u234diq@4ax.com> <1794949078-5857@newsgrouper.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: BGB <cr88192@gmail.com> Newsgroups: comp.arch Subject: Re: vector length CSR? Date: Tue, 17 Nov 2026 17:40:15 -0600 Organization: A noiseless patient Spider Lines: 153 Message-ID: <11diol0$s9f8$1@dont-email.me> References: <11cpqih$acf5$1@dont-email.me> <11cr2g5$q796$2@dont-email.me> <11crh64$ug0s$1@dont-email.me> <11crili$ur2d$1@dont-email.me> <11crrs5$118ll$1@dont-email.me> <11crsp0$11gka$1@dont-email.me> <YQsIS.6524$wY2.2685@fx24.iad> <2026Nov10.100317@mips.complang.tuwien.ac.at> <gq0dflh8afjsm6u6jqqihfd047eb7n1mu1@4ax.com> <11d768o$t2b3$1@dont-email.me> <dn9pfl5lj8pqh0cqb4lhb5dbdt5u234diq@4ax.com> <1794949078-5857@newsgrouper.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 17 Nov 2026 23:40:16 +0000 (UTC) Injection-Info: dont-email.me; logging-data="927208"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iAlqIyeiWbUmfOsZKlkDlNHy2UnPK3io="; posting-host="127f2a0fcc35eab14ff4eb32f6693843" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:DCwWfkENpQtAshRT+8NDXGsBb4w= sha256:DsGfBIaNihTEZWuEB2Cs4WOZiYn8SNyDZX4r0hF3qDg= sha1:pCRIMk6KHEBxgqoDNNfdtDKFCK4= sha256:Oe1tgDBqbOI/NyC8l3UmUvejBQQAnOgG6/2AFIcfBe0= In-Reply-To: <1794949078-5857@newsgrouper.org> Content-Language: en-US