Roger Ferrer Ibanez

Hi all,

I understand the EEW, as explicitly encoded in the load/store instructions applies to the vector of indices for the indexed loads and stores. For instance we can load a vector "SEW=8,LMUL=1" using a vector of indices of "SEW=64,LMUL=8" by making sure vtype has "SEW=8,LMUL=1" and using v{l,s}xei64.

I'd like to confirm I'm understanding correctly the EEW for unit-stride and strided loads and stores.

Say that vtype is such that SEW=16,LMUL=1 and we execute a v{l,s}{,s}e32.v. Now the EEW of the data and address operands is EEW=32 (as encoded in the instruction) so EMUL=(EEW/SEW)*LMUL=(32/16)*1=2. So in this case we're loading/storing a vector SEW=32,LMUL=2.

Is my interpretation correct?

If it is, I assume this is useful in sequences such as the following one

# SEW=16,LMUL=1
vle16.v v1, (t0)    # Load a vector of sew=16,lmul=1
vle32.v v2, (t1)    # Load a vector of sew=32,lmul=2, cool, no need to change vtype
vwadd.wv v4, v2, v1 # v4_v5(32)[:] ← v2_v3(32)[:] + sign-extend(v1(16)[:])
vse32.v v4, (t1)    # Store a vector of sew=32,lmul=2, no need to change vtype either

Thank you,

--
Roger Ferrer Ibáñez - roger.ferrer@...
Barcelona Supercomputing Center - Centro Nacional de Supercomputación

http://bsc.es/disclaimer Krste Asanovic

Correct,
Krste

On Sep 2, 2020, at 11:10 PM, Roger Ferrer Ibanez <roger.ferrer@...> wrote:

Hi all,

I understand the EEW, as explicitly encoded in the load/store instructions applies to the vector of indices for the indexed loads and stores. For instance we can load a vector "SEW=8,LMUL=1" using a vector of indices of "SEW=64,LMUL=8" by making sure vtype has "SEW=8,LMUL=1" and using v{l,s}xei64.

I'd like to confirm I'm understanding correctly the EEW for unit-stride and strided loads and stores.

Say that vtype is such that SEW=16,LMUL=1 and we execute a v{l,s}{,s}e32.v. Now the EEW of the data and address operands is EEW=32 (as encoded in the instruction) so EMUL=(EEW/SEW)*LMUL=(32/16)*1=2. So in this case we're loading/storing a vector SEW=32,LMUL=2.

Is my interpretation correct?

If it is, I assume this is useful in sequences such as the following one

# SEW=16,LMUL=1
vle16.v v1, (t0) # Load a vector of sew=16,lmul=1
vle32.v v2, (t1) # Load a vector of sew=32,lmul=2, cool, no need to change vtype
vwadd.wv v4, v2, v1 # v4_v5(32)[:] ← v2_v3(32)[:] + sign-extend(v1(16)[:])
vse32.v v4, (t1) # Store a vector of sew=32,lmul=2, no need to change vtype either

Thank you,

--
Roger Ferrer Ibáñez - roger.ferrer@...
Barcelona Supercomputing Center - Centro Nacional de Supercomputación

http://bsc.es/disclaimer

 1 - 2 of 2
{"ft_lang_label":"__label__en","ft_lang_prob":0.7743733,"math_prob":0.8585646,"size":1456,"snap":"2022-40-2023-06","text_gpt3_token_len":504,"char_repetition_ratio":0.1053719,"word_repetition_ratio":0.01746725,"special_character_ratio":0.31936812,"punctuation_ratio":0.16369048,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9940011,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,2,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-28T17:25:09Z\",\"WARC-Record-ID\":\"<urn:uuid:5d9c1aec-38a0-48d2-b16f-3a04a2fa9f59>\",\"Content-Length\":\"86879\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1ddc4236-78a6-4280-900f-fe0e573ed496>\",\"WARC-Concurrent-To\":\"<urn:uuid:077e1b23-560d-4436-bd9d-4067b0d66de6>\",\"WARC-IP-Address\":\"45.79.81.153\",\"WARC-Target-URI\":\"https://lists.riscv.org/g/tech-vector-ext/topic/eew_and_non_indexed/76600986?p=,,,20,0,0,0::recentpostdate/sticky,,,20,1,80,76600986,previd%3D1596913146532363318,nextid%3D1600380287453817304&previd=1596913146532363318&nextid=1600380287453817304\",\"WARC-Payload-Digest\":\"sha1:I5MEKFWBOI54AVOPPKC7JZCNIRY7Y4WA\",\"WARC-Block-Digest\":\"sha1:MONWCIDTDR2OCYLVMWXAABBDLK3XGDKB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499646.23_warc_CC-MAIN-20230128153513-20230128183513-00548.warc.gz\"}"}