Tuesday, 2021-09-28

lkclghostmansd[m], fantastic10:08
lkclghostmansd[m], yes, i haven't put anything in yet.10:08
ghostmansd[m]lkcl: should I check svp64 as well?10:09
ghostmansd[m]Actually the _whole_ helpers model is changed, once I commit this10:09
ghostmansd[m]They _all_ will deal with `self.whatever` instead of `whatever`10:10
ghostmansd[m]So perhaps we must double-check it10:10
ghostmansd[m]Please, also check the code for sanity. The "helper" thing, as I mentioned, can now be removed, it only served as an intermediate stage so that nothing is broken between commits.10:11
lkclghostmansd[m], no, no need - not in test_issuer.py10:14
lkcllet me do a bit of waking up and at least 1 cup coffee and 1 tea :)10:14
ghostmansd[m]Sure :-)10:15
lkclghostmansd[m], test_caller_svp64_mapreduce.py10:32
lkcl    FRT = self.FPMUL32(FRA, FRC)10:32
lkcl  File "/home/lkcl/src/libresoc/openpower-isa/src/openpower/decoder/helpers.py", line 279, in FPMUL3210:32
lkcl    from openpower.decoder.isafunctions.double2single import DOUBLE2SINGLE10:32
lkclImportError: cannot import name 'DOUBLE2SINGLE' from 'openpower.decoder.isafunctions.double2single' (/home/lkcl/src/libresoc/openpower-isa/src/openpower/decoder/isafunctions/double2single.py)10:32
lkcllet's take a look10:33
lkclisafunctions/bcd.py is inheriting from ISACallerHelper10:35
lkclso is fpfromint.py10:36
lkcletc. etc.10:36
lkclwhich means that there's multiple inheritance (multiple ISACallerHelper inheritance)10:36
lkcllikewise in fixedload.py etc.10:36
lkcldozens of them10:36
lkclwhere, actually, it's likely that only one is needed10:37
lkclFPMUL32 etc. all need to be class-i-fied10:37
ghostmansd[m]Hm. Did you re-run both pywriter and pyfnwriter?10:37
lkcllook at helpers.py line 27910:38
ghostmansd[m]Ah, ok10:38
ghostmansd[m]I now think I understand10:38
lkclthe assumption there is that DOUBLE2SINGLE is a function that can be imported10:38
lkcli'm talking about 2 separate issues btw10:38
ghostmansd[m]I saw there's an import inside def10:38
lkcl1) multiple inheritance of ISACallerHelper10:38
ghostmansd[m]Forgot to deal with it10:38
lkcl2) yes, import inside def.10:38
lkclwhich was needed to get round some import issues.10:38
lkcllet me try just removing it10:39
lkclcircular import dependencies10:39
ghostmansd[m]Simply removing it won't work10:39
ghostmansd[m]Because you actually use the stuff you import, right?10:39
ghostmansd[m]I think these things should be moved into the class, and use self.IMPORTED_STUFF10:40
lkclso FPMUL32 (etc) need to be made a class10:40
ghostmansd[m]Also, what's the problem with inheritance?10:40
lkclit *should* be the case that only one ISACallerHelper is needed10:41
ghostmansd[m]Having any class inherited from ISACallerHelper actually _allows_ to call self.WHATEVER10:41
lkclby ISACaller only10:41
lkclthat's the theory, at least10:41
ghostmansd[m]That is, if you have some generated helper, which calls e.g. EXTS, you can call ISACallerHelper.EXTS from the generated helper.10:42
ghostmansd[m]No, it shouldn't, because otherwise the fact that you call code from parent class is hidden by depths of ISACaller.10:42
ghostmansd[m]In the current approach, it's explicit. Any generated helper is able to use code from static helper.10:43
* lkcl needs more coffee / tea10:43
ghostmansd[m]I think there's an issue, though.10:43
ghostmansd[m]Names must be different.10:43
lkcli'm going to do DOUBLE2SINGLE import thing10:43
ghostmansd[m]So, IIRC, they are. You have ISAFnCallerHelper, and ISACallerHelper.10:43
ghostmansd[m]The former is generated one, the latter is "static".10:44
ghostmansd[m]And generated ones are able to use stuff from static, and they do it by inheritance.10:44
lkclok so everything (FPMUL32) should drop into ISACallerHelper?10:46
lkclgoing to do it slightly differently10:49
lkclfor FP have them in a separate class ISAFPhelpers10:49
lkcljust "because"10:49
ghostmansd[m]You'd need to inherit this in ISACaller, then.11:04
lkclinheritance from ISACallerFnHelper is missing in all.py auto-generated class ISA11:04
lkclexcellent, sorted11:05
lkclinteresting, ltu and gtu are missing11:05
lkcl  File "/home/lkcl/src/libresoc/openpower-isa/src/openpower/decoder/isafunctions/double2single.py", line 124, in DOUBLE11:05
lkcl    if gtu(WORD[1:9], 0) & ltu(WORD[1:9], 255):11:05
lkclNameError: name 'gtu' is not defined11:05
lkclthose need to also be self-i-fied11:08
lkclexcept, oink, where have they gone?11:09
lkclthey have different names11:10
lkclfrom openpower.decoder.selectable_int import selectltu as ltu11:10
lkclfrom openpower.decoder.selectable_int import selectgtu as gtu11:10
lkcldeal with that with a cheat11:11
lkclhmmm except it's DOUBLE2SINGLE that needs them, hmmm11:12
lkcli am not understanding.11:13
ghostmansd[m]Did you push changes into XLEN branch?11:19
lkclrun python3 decoder/isa/test_caller_svp64_mapreduce.py >& /tmp/f611:20
lkcl    def DOUBLE2SINGLE(self, FR):11:20
lkcl        if ltu(FR[1:12], 897) & gtu(FR[1:64], 0):11:20
lkclltu and gtu are not being picked up by ISACallerHelper11:20
lkclthose really should be self.ltu. self.gtu11:21
lkclself.eq as well11:21
ghostmansd[m]Should they?11:21
lkcl1 sec11:21
ghostmansd[m]Because these, like concat and some other folks, seem like they should be global.11:22
lkcldecode/isa/system.py has imports for them11:22
lkclso why are they now missing from fpwriter?11:22
ghostmansd[m]I mean, we must either import them, or use self. notation, choose one.11:22
lkclfrom openpower.decoder.helpers import (11:22
lkcl                                 ne, eq, gt, ge, lt, le, ltu, gtu, length,11:22
ghostmansd[m]I think import was lost11:22
lkclimport them11:22
lkclyes, looks like it11:22
lkcl1 sec...11:23
lkcldo they change depending on XLEN...11:23
lkclnnnooo... because the SelectableInt by that point should have been reduced to the correct length11:23
lkclok we're good11:23
lkcl+++ b/src/openpower/decoder/pseudo/pyfnwriter.py11:24
lkcl-from openpower.decoder.helpers import (EXTS, EXTS64, EXTZ64, ROTL64, ROTL32,11:24
lkcl-                                 MASK, MASK32,11:24
lkcl-                                 ne, eq, gt, ge, lt, le, ltu, gtu, length,11:24
lkcli'll add ne eq etc. etc. back in11:24
lkclhooray that was it11:26
lkclall good11:26
lkclpython3 decoder/isa/test_caller_svp64_fp.py good11:27
lkclpython3 decoder/isa/test_caller_fp.py good11:28
lkclwhoops test_caller_svp64_dct.py broken, i know why11:29
lkcli was using that global function for conversion purposes inside the unit test.11:30
lkclshouuuuld be ok to declare an instance of it... hmmm11:30
lkclthis'll be interesting11:31
lkclcool! worked!11:34
lkclsame thing for fft11:35
lkclno errors on test_issuer.py11:42
lkclpython3 decoder/isa/test_caller_svp64_fft.py good11:43
lkclpython3 decoder/isa/test_caller_svp64_ldst.py good11:43
lkclfrickin lot of tests :11:44
ghostmansd[m]So, just when I got to take a quick look, you already got it fixed?11:44
ghostmansd[m]Awesome :-)11:44
ghostmansd[m]Because I could take a closer look only in the evening11:45
ghostmansd[m]So it was missing import all way long, right?11:45
ghostmansd[m]Aaah, I see. You used functions directly in tests.11:46
ghostmansd[m]Well, actually there's a way to get through it. We might have ISAFnCallerHelper act as ISACallerHelper.11:47
ghostmansd[m]That is, a little magic __getattr__ never killed nobody...11:47
ghostmansd[m]This way, function will be on the global scope, but class would redirect the these.11:48
ghostmansd[m]*to these11:48
ghostmansd[m]lkcl, what do you think about it?11:49
lkcloo-err :)11:53
lkclif you can make it work, great11:53
lkclbtw you saw the "inject" decorator in caller.py?11:53
lkclone of the worst abusive python hacks i've ever used.  dropping local variables into a global scope :)11:54
lkcli think it rates "2nd" on my scale of "most twisted uses of python ever"11:55
lkcldecoder/isa/test_caller_svp64_matrix.py good11:57
lkclremoved the import (not needed)11:57
ghostmansd[m]I wonder what's the first11:58
lkclpython3 decoder/isa/test_caller_svp64_predication.py good11:58
ghostmansd[m]On second thought, I think that you might need to use ISACaller in tests11:59
ghostmansd[m]And use helpers from there11:59
lkcli think that's the lot11:59
lkclit won't be accessible11:59
lkclwe're removing dependence on specifics from all unit tests11:59
lkcland making them possible to run on e.g. microwatt12:00
lkclor qemu12:00
lkclor power-gem512:00
ghostmansd[m]Hm. Shouldn't you have your own DOUBLE2SINGLE in tests, then?12:00
lkclor remote-GDB to an IBM POWER9 system over an ssh connection12:00
lkcli'm not keen on spending the time doing that12:00
ghostmansd[m]Well, still sounds like The Right Thing To Do :-)12:01
lkclif we absolutely had to i'd prefer that pyfnwriter.py had an option to auto-generated class *or* function12:01
ghostmansd[m]Actually we can do it12:01
ghostmansd[m]With God-blessed "helper" parameter12:02
lkcli'm going to cherry-pick over everything12:02
ghostmansd[m](what an idiotic name)12:02
ghostmansd[m](I have no idea how to call it better, though)12:02
lkclpffh me neither12:03
ghostmansd[m]So 712 is done, amirite?12:04
ghostmansd[m]And we can return to 68412:04
ghostmansd[m]Or what was it, don't recall12:05
ghostmansd[m]Well, the thing which needed to know of XLEN12:05
lkcllooks like 712 is, yes.12:05
lkclXLEN=8 failing, yes.12:06
lkclgo for it12:06
ghostmansd[m]Ok, will update it in tracking in the evening today12:06
ghostmansd[m]Please re-check budget12:06
ghostmansd[m]Also NLnet is silent on other RFPs12:06
lkclyep i'll have a word with them12:07
lkclit could be that they're waiting for the EU to pay them12:08
ghostmansd[m]Thank you!12:08
lkclthey have to put in requests to the EU to draw down from the EUR 5.6 million grant12:08
lkclthey haven't been given all of it as cash up-front, it's a "reservation"12:08
lkclcherry-picks all done12:13
ghostmansd[m]Thank you for help!12:14
lkcledited https://libre-soc.org/3mdeb/ghostmansd/ for you12:17
lkclwhich ones of those are submitted, can you put a sub-section "submitted for rfp, date {insert date}"12:17
*** farosas_ is now known as farosas19:11
ghostmansd[m]lkcl, are you here?21:07
ghostmansd[m]I made an error and squashed a recent commit into libreriscv, and pushed it21:08
ghostmansd[m]Got lost with XLEN branch21:08
ghostmansd[m]Do you have any work there now?21:08
ghostmansd[m]I'd like to un-squash it, and push it21:09
ghostmansd[m]For now I reverted bad chunk and committed it as standalone commit, but I still changed your commit (it had no title before)21:11
ghostmansd[m]Sorry for this21:12
ghostmansd[m]lkcl: I've pushed XLCASTS/XLCASTU helpers to XLEN branch, do they meet the expectations? I still don't quite understand how PPC works wrt sign.21:23
ghostmansd[m]In other archs, sign would be `sign = (value & (1 << (XLEN - 1)))`.21:38
ghostmansd[m]Or, more correctly, `sign = ((value & (1 << (XLEN - 1))) != 0)`.21:39
ghostmansd[m]Where XLEN stands for an integer size.21:39
lkclok am back.  internet disconnected23:00
lkclghostmansd[m], if you damage the repo, don't try to "recover" it23:00
lkclgenerally, using force-push is not a good idea23:01
programmerjakelkcl, meeting...23:02
lkclyes, i know: i've only just recovered the internet connection and need to investigate potential damage to the repository, urgently23:02
lkclghostmansd[m], i'm not seeing anything missing in master branch since cherry-picking the helpers across23:03
lkclanything in xlen is therefore "irrelevant" because it's already over in master branch23:03
lkclso i think it's good23:03
lkclsigned and unsigned can only be one way23:06
lkclISA architecture is irrelevant23:06
lkclsigned and unsigned *have* to be identical in every respect across all architectures23:06
lkclit's too fundamental23:06
lkclghostmansd[m]> In other archs, sign would be `sign = (value & (1 << (XLEN - 1)))`23:07
lkclyou mean,23:07
lkclghostmansd[m]> In ***ALL*** archs, sign ***IS*** be `sign = (value & (1 << (XLEN - 1)))`23:07

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!