lkcl | ghostmansd[m], fantastic | 10:08 |
---|---|---|
lkcl | ghostmansd[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 this | 10:09 |
ghostmansd[m] | They _all_ will deal with `self.whatever` instead of `whatever` | 10:10 |
ghostmansd[m] | So perhaps we must double-check it | 10: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 |
lkcl | ghostmansd[m], no, no need - not in test_issuer.py | 10:14 |
lkcl | let me do a bit of waking up and at least 1 cup coffee and 1 tea :) | 10:14 |
ghostmansd[m] | Sure :-) | 10:15 |
lkcl | ghostmansd[m], test_caller_svp64_mapreduce.py | 10: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 FPMUL32 | 10:32 |
lkcl | from openpower.decoder.isafunctions.double2single import DOUBLE2SINGLE | 10:32 |
lkcl | ImportError: cannot import name 'DOUBLE2SINGLE' from 'openpower.decoder.isafunctions.double2single' (/home/lkcl/src/libresoc/openpower-isa/src/openpower/decoder/isafunctions/double2single.py) | 10:32 |
lkcl | let's take a look | 10:33 |
lkcl | ah | 10:35 |
lkcl | isafunctions/bcd.py is inheriting from ISACallerHelper | 10:35 |
lkcl | so is fpfromint.py | 10:36 |
lkcl | etc. etc. | 10:36 |
lkcl | which means that there's multiple inheritance (multiple ISACallerHelper inheritance) | 10:36 |
lkcl | likewise in fixedload.py etc. | 10:36 |
lkcl | dozens of them | 10:36 |
lkcl | where, actually, it's likely that only one is needed | 10:37 |
lkcl | FPMUL32 etc. all need to be class-i-fied | 10:37 |
ghostmansd[m] | Hm. Did you re-run both pywriter and pyfnwriter? | 10:37 |
lkcl | yes | 10:37 |
lkcl | look at helpers.py line 279 | 10:38 |
ghostmansd[m] | Ah, ok | 10:38 |
ghostmansd[m] | Confused | 10:38 |
ghostmansd[m] | I now think I understand | 10:38 |
lkcl | the assumption there is that DOUBLE2SINGLE is a function that can be imported | 10:38 |
lkcl | i'm talking about 2 separate issues btw | 10:38 |
ghostmansd[m] | I saw there's an import inside def | 10:38 |
lkcl | 1) multiple inheritance of ISACallerHelper | 10:38 |
ghostmansd[m] | Forgot to deal with it | 10:38 |
lkcl | 2) yes, import inside def. | 10:38 |
lkcl | which was needed to get round some import issues. | 10:38 |
lkcl | let me try just removing it | 10:39 |
lkcl | circular import dependencies | 10:39 |
ghostmansd[m] | Simply removing it won't work | 10:39 |
lkcl | yuk | 10:39 |
ghostmansd[m] | Because you actually use the stuff you import, right? | 10:39 |
lkcl | yes. | 10:40 |
ghostmansd[m] | I think these things should be moved into the class, and use self.IMPORTED_STUFF | 10:40 |
lkcl | so FPMUL32 (etc) need to be made a class | 10:40 |
lkcl | yep | 10:40 |
ghostmansd[m] | Also, what's the problem with inheritance? | 10:40 |
lkcl | it *should* be the case that only one ISACallerHelper is needed | 10:41 |
ghostmansd[m] | Having any class inherited from ISACallerHelper actually _allows_ to call self.WHATEVER | 10:41 |
lkcl | by ISACaller only | 10:41 |
lkcl | that's the theory, at least | 10: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 / tea | 10:43 | |
ghostmansd[m] | I think there's an issue, though. | 10:43 |
ghostmansd[m] | Names must be different. | 10:43 |
lkcl | i'm going to do DOUBLE2SINGLE import thing | 10: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 |
lkcl | ok so everything (FPMUL32) should drop into ISACallerHelper? | 10:46 |
lkcl | going to do it slightly differently | 10:49 |
lkcl | for FP have them in a separate class ISAFPhelpers | 10:49 |
lkcl | just "because" | 10:49 |
ghostmansd[m] | You'd need to inherit this in ISACaller, then. | 11:04 |
lkcl | yes | 11:04 |
lkcl | inheritance from ISACallerFnHelper is missing in all.py auto-generated class ISA | 11:04 |
lkcl | excellent, sorted | 11:05 |
lkcl | interesting, ltu and gtu are missing | 11:05 |
lkcl | File "/home/lkcl/src/libresoc/openpower-isa/src/openpower/decoder/isafunctions/double2single.py", line 124, in DOUBLE | 11:05 |
lkcl | if gtu(WORD[1:9], 0) & ltu(WORD[1:9], 255): | 11:05 |
lkcl | NameError: name 'gtu' is not defined | 11:05 |
lkcl | those need to also be self-i-fied | 11:08 |
lkcl | except, oink, where have they gone? | 11:09 |
lkcl | ahhhh | 11:10 |
lkcl | they have different names | 11:10 |
lkcl | unexpected. | 11:10 |
lkcl | from openpower.decoder.selectable_int import selectltu as ltu | 11:10 |
lkcl | from openpower.decoder.selectable_int import selectgtu as gtu | 11:10 |
lkcl | deal with that with a cheat | 11:11 |
lkcl | hmmm except it's DOUBLE2SINGLE that needs them, hmmm | 11:12 |
lkcl | i am not understanding. | 11:13 |
ghostmansd[m] | Did you push changes into XLEN branch? | 11:19 |
lkcl | yes | 11:19 |
lkcl | run python3 decoder/isa/test_caller_svp64_mapreduce.py >& /tmp/f6 | 11:20 |
ghostmansd[m] | Ok | 11:20 |
lkcl | double2single.py | 11:20 |
lkcl | def DOUBLE2SINGLE(self, FR): | 11:20 |
lkcl | if ltu(FR[1:12], 897) & gtu(FR[1:64], 0): | 11:20 |
lkcl | ltu and gtu are not being picked up by ISACallerHelper | 11:20 |
lkcl | those really should be self.ltu. self.gtu | 11:21 |
lkcl | self.eq as well | 11:21 |
ghostmansd[m] | Should they? | 11:21 |
lkcl | hmmm | 11:21 |
lkcl | 1 sec | 11:21 |
ghostmansd[m] | Because these, like concat and some other folks, seem like they should be global. | 11:22 |
lkcl | decode/isa/system.py has imports for them | 11:22 |
lkcl | so 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 |
lkcl | decoder/isa/system.py: | 11:22 |
lkcl | from openpower.decoder.helpers import ( | 11:22 |
lkcl | ne, eq, gt, ge, lt, le, ltu, gtu, length, | 11:22 |
ghostmansd[m] | I think import was lost | 11:22 |
lkcl | import them | 11:22 |
lkcl | yes, looks like it | 11:22 |
lkcl | 1 sec... | 11:23 |
lkcl | eq.... | 11:23 |
lkcl | do they change depending on XLEN... | 11:23 |
lkcl | nnnooo... because the SelectableInt by that point should have been reduced to the correct length | 11:23 |
lkcl | ok we're good | 11:23 |
lkcl | +++ b/src/openpower/decoder/pseudo/pyfnwriter.py | 11: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 |
lkcl | i'll add ne eq etc. etc. back in | 11:24 |
lkcl | hooray that was it | 11:26 |
lkcl | all good | 11:26 |
lkcl | python3 decoder/isa/test_caller_svp64_fp.py good | 11:27 |
lkcl | python3 decoder/isa/test_caller_fp.py good | 11:28 |
lkcl | whoops test_caller_svp64_dct.py broken, i know why | 11:29 |
lkcl | nuts. | 11:30 |
lkcl | i was using that global function for conversion purposes inside the unit test. | 11:30 |
lkcl | shouuuuld be ok to declare an instance of it... hmmm | 11:30 |
lkcl | this'll be interesting | 11:31 |
lkcl | cool! worked! | 11:34 |
lkcl | same thing for fft | 11:35 |
lkcl | urr | 11:35 |
lkcl | no errors on test_issuer.py | 11:42 |
lkcl | awesome | 11:42 |
lkcl | python3 decoder/isa/test_caller_svp64_fft.py good | 11:43 |
lkcl | python3 decoder/isa/test_caller_svp64_ldst.py good | 11:43 |
lkcl | frickin lot of tests : | 11:44 |
lkcl | :) | 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 evening | 11: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] | *functions | 11:48 |
ghostmansd[m] | *to these | 11:48 |
ghostmansd[m] | lkcl, what do you think about it? | 11:49 |
lkcl | oo-err :) | 11:53 |
lkcl | if you can make it work, great | 11:53 |
lkcl | btw you saw the "inject" decorator in caller.py? | 11:53 |
lkcl | one of the worst abusive python hacks i've ever used. dropping local variables into a global scope :) | 11:54 |
lkcl | i think it rates "2nd" on my scale of "most twisted uses of python ever" | 11:55 |
lkcl | decoder/isa/test_caller_svp64_matrix.py good | 11:57 |
lkcl | removed the import (not needed) | 11:57 |
ghostmansd[m] | lol | 11:58 |
ghostmansd[m] | I wonder what's the first | 11:58 |
lkcl | python3 decoder/isa/test_caller_svp64_predication.py good | 11:58 |
ghostmansd[m] | On second thought, I think that you might need to use ISACaller in tests | 11:59 |
ghostmansd[m] | And use helpers from there | 11:59 |
lkcl | i think that's the lot | 11:59 |
lkcl | it won't be accessible | 11:59 |
lkcl | we're removing dependence on specifics from all unit tests | 11:59 |
lkcl | and making them possible to run on e.g. microwatt | 12:00 |
lkcl | or qemu | 12:00 |
lkcl | or power-gem5 | 12:00 |
ghostmansd[m] | Hm. Shouldn't you have your own DOUBLE2SINGLE in tests, then? | 12:00 |
lkcl | or remote-GDB to an IBM POWER9 system over an ssh connection | 12:00 |
lkcl | sigh | 12:00 |
lkcl | i'm not keen on spending the time doing that | 12:00 |
ghostmansd[m] | Well, still sounds like The Right Thing To Do :-) | 12:01 |
lkcl | if we absolutely had to i'd prefer that pyfnwriter.py had an option to auto-generated class *or* function | 12:01 |
lkcl | blech | 12:01 |
ghostmansd[m] | Actually we can do it | 12:01 |
ghostmansd[m] | With God-blessed "helper" parameter | 12:02 |
lkcl | i'm going to cherry-pick over everything | 12:02 |
lkcl | nice! | 12:02 |
ghostmansd[m] | (what an idiotic name) | 12:02 |
ghostmansd[m] | (I have no idea how to call it better, though) | 12:02 |
lkcl | pffh me neither | 12:03 |
ghostmansd[m] | So 712 is done, amirite? | 12:04 |
ghostmansd[m] | And we can return to 684 | 12:04 |
ghostmansd[m] | Or what was it, don't recall | 12:05 |
ghostmansd[m] | Well, the thing which needed to know of XLEN | 12:05 |
lkcl | looks like 712 is, yes. | 12:05 |
lkcl | XLEN=8 failing, yes. | 12:06 |
lkcl | go for it | 12:06 |
ghostmansd[m] | Ok, will update it in tracking in the evening today | 12:06 |
ghostmansd[m] | Please re-check budget | 12:06 |
ghostmansd[m] | Also NLnet is silent on other RFPs | 12:06 |
lkcl | yep i'll have a word with them | 12:07 |
lkcl | it could be that they're waiting for the EU to pay them | 12:08 |
ghostmansd[m] | Thank you! | 12:08 |
lkcl | they have to put in requests to the EU to draw down from the EUR 5.6 million grant | 12:08 |
lkcl | they haven't been given all of it as cash up-front, it's a "reservation" | 12:08 |
lkcl | cherry-picks all done | 12:13 |
ghostmansd[m] | Great! | 12:13 |
ghostmansd[m] | Thank you for help! | 12:14 |
lkcl | edited https://libre-soc.org/3mdeb/ghostmansd/ for you | 12:17 |
lkcl | which ones of those are submitted, can you put a sub-section "submitted for rfp, date {insert date}" | 12:17 |
*** farosas_ is now known as farosas | 19:11 | |
ghostmansd[m] | lkcl, are you here? | 21:07 |
ghostmansd[m] | I made an error and squashed a recent commit into libreriscv, and pushed it | 21:08 |
ghostmansd[m] | Got lost with XLEN branch | 21:08 |
ghostmansd[m] | Do you have any work there now? | 21:08 |
ghostmansd[m] | I'd like to un-squash it, and push it | 21: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 this | 21: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 |
lkcl | ok am back. internet disconnected | 23:00 |
lkcl | ghostmansd[m], if you damage the repo, don't try to "recover" it | 23:00 |
lkcl | generally, using force-push is not a good idea | 23:01 |
programmerjake | lkcl, meeting... | 23:02 |
lkcl | yes, i know: i've only just recovered the internet connection and need to investigate potential damage to the repository, urgently | 23:02 |
lkcl | ghostmansd[m], i'm not seeing anything missing in master branch since cherry-picking the helpers across | 23:03 |
lkcl | anything in xlen is therefore "irrelevant" because it's already over in master branch | 23:03 |
lkcl | so i think it's good | 23:03 |
lkcl | signed and unsigned can only be one way | 23:06 |
lkcl | ISA architecture is irrelevant | 23:06 |
lkcl | signed and unsigned *have* to be identical in every respect across all architectures | 23:06 |
lkcl | it's too fundamental | 23:06 |
lkcl | ghostmansd[m]> In other archs, sign would be `sign = (value & (1 << (XLEN - 1)))` | 23:07 |
lkcl | you mean, | 23:07 |
lkcl | ghostmansd[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/!