2021-03-21
00:29rockinrobstar[m] has joined #asahi-gpu
00:29rockinrobstar[m] has joined #asahi-gpu
00:38JusticeEX has quit [Ping timeout: 246 seconds]
00:38JusticeEX has quit [Ping timeout: 246 seconds]
01:16yrlf has quit [Quit: Ping timeout (120 seconds)]
01:16yrlf has quit [Quit: Ping timeout (120 seconds)]
01:18DarkShadow44bloom: How exactly snooping GPU memory? Is that what comes out from wrap.c:dump_mappings?
01:18DarkShadow44bloom: How exactly snooping GPU memory? Is that what comes out from wrap.c:dump_mappings?
01:18yrlf has joined #asahi-gpu
01:18yrlf has joined #asahi-gpu
01:19DarkShadow44yes, for analysing the ISA
01:19DarkShadow44yes, for analysing the ISA
01:23dougalli find this branch the easiest way to build and get G13 code from a metallib: https://github.com/Thog/gpu/tree/metallib (you can modify macho_disasm.c to write the code to a file instead of calling agx_disassemble... but metallib code does compile a bit differently to non-library code, so something like dump_mappings is preferable for that)
01:23dougalli find this branch the easiest way to build and get G13 code from a metallib: https://github.com/Thog/gpu/tree/metallib (you can modify macho_disasm.c to write the code to a file instead of calling agx_disassemble... but metallib code does compile a bit differently to non-library code, so something like dump_mappings is preferable for that)
01:24dougall(e.g. it'll never use the discard hint, as it can't assume all threads are active when the library function is called)
01:24dougall(e.g. it'll never use the discard hint, as it can't assume all threads are active when the library function is called)
01:27DarkShadow44ah thanks. so, to be clear, dump_mappings does indeed dump G13 code as well?
01:27DarkShadow44ah thanks. so, to be clear, dump_mappings does indeed dump G13 code as well?
01:29linuxgemini has quit [Read error: Connection reset by peer]
01:29linuxgemini has quit [Read error: Connection reset by peer]
01:29dougalli'm like 90% sure - yeah - the tricky bit is it'll dump code for about six other different shaders and you have to find the code you care aboout at some offset in one of the dumped mappings...
01:29dougalli'm like 90% sure - yeah - the tricky bit is it'll dump code for about six other different shaders and you have to find the code you care aboout at some offset in one of the dumped mappings...
01:30DarkShadow44oh I see...
01:30DarkShadow44oh I see...
01:30DarkShadow44about the caching bit, I only knew about metallib shader files
01:30DarkShadow44about the caching bit, I only knew about metallib shader files
01:31DarkShadow44are shaders usually uploaded to the driver as source code? Or why is there a generation difference?
01:31DarkShadow44are shaders usually uploaded to the driver as source code? Or why is there a generation difference?
01:31DarkShadow44not quite sure how the caching/threads work yet
01:31DarkShadow44not quite sure how the caching/threads work yet
01:31dougall(i got it working with an old revision of asahilinux/gpu and never updated - iirc one of these hardcoded offsets worked for me https://github.com/AsahiLinux/gpu/blob/b9591908e19a737aaa60c28619fbd39a091ce0f1/wrap/wrap.c#L143 )
01:31dougall(i got it working with an old revision of asahilinux/gpu and never updated - iirc one of these hardcoded offsets worked for me https://github.com/AsahiLinux/gpu/blob/b9591908e19a737aaa60c28619fbd39a091ce0f1/wrap/wrap.c#L143 )
01:38dougall(or, if I'm understanding correctly, I think they're usually given to the driver as LLVM IR? which it specialises because it knows "this is a top level compute or whatever function"? but that's mainly based on having used those two tools on the same functions and seen the code differences, so I'm not sure)
01:38dougall(or, if I'm understanding correctly, I think they're usually given to the driver as LLVM IR? which it specialises because it knows "this is a top level compute or whatever function"? but that's mainly based on having used those two tools on the same functions and seen the code differences, so I'm not sure)
01:54JusticeEX has joined #asahi-gpu
01:54JusticeEX has joined #asahi-gpu
02:21DarkShadow44hm, according to what I found, metallib seems to be LLVM IR code
02:21DarkShadow44hm, according to what I found, metallib seems to be LLVM IR code
02:21DarkShadow44they are definitely not macho, the magic is different
02:21DarkShadow44they are definitely not macho, the magic is different
02:22DarkShadow44my I ask how you got your shader mdougall: acho?
02:22DarkShadow44my I ask how you got your shader mdougall: acho?
02:22DarkShadow44dougal: may I ask how you gor your shader-macho file?
02:22DarkShadow44dougal: may I ask how you gor your shader-macho file?
02:26dougallah, yeah (heh, neither of those pings worked) - I use https://github.com/Thog/gpu/blob/metallib/metal_compiler.m which calls [MTLDynamicLibrary serializeToURL:...] to generate it
02:26dougallah, yeah (heh, neither of those pings worked) - I use https://github.com/Thog/gpu/blob/metallib/metal_compiler.m which calls [MTLDynamicLibrary serializeToURL:...] to generate it
02:27dougall(command to compile it is in a comment at the top of that file - sorry if that's pointing out the obvious, but i missed it myself)
02:27dougall(command to compile it is in a comment at the top of that file - sorry if that's pointing out the obvious, but i missed it myself)
02:31DarkShadow44ah thanks, I kinda missed that
02:31DarkShadow44ah thanks, I kinda missed that
02:32DarkShadow44probably won't need the compiler snipped, since I'm using XCode
02:32DarkShadow44probably won't need the compiler snipped, since I'm using XCode
02:39omoiti has joined #asahi-gpu
02:39omoiti has joined #asahi-gpu
03:02odmir has quit [Remote host closed the connection]
03:02odmir has quit [Remote host closed the connection]
03:24really3 has quit [Remote host closed the connection]
03:24really3 has quit [Remote host closed the connection]
03:33phiologe has quit [Ping timeout: 240 seconds]
03:33phiologe has quit [Ping timeout: 240 seconds]
03:34phiologe has joined #asahi-gpu
03:34phiologe has joined #asahi-gpu
03:40omoiti has quit [Ping timeout: 265 seconds]
03:40omoiti has quit [Ping timeout: 265 seconds]
04:16DarkShadow44dougall: Is there a specific instruction where I could help fill in the gaps? As a beginner, and so.
04:16DarkShadow44dougall: Is there a specific instruction where I could help fill in the gaps? As a beginner, and so.
05:51akemin_dayo has quit [Ping timeout: 245 seconds]
05:51akemin_dayo has quit [Ping timeout: 245 seconds]
06:01dougallhmm, not that springs to mind... maybe the instructions that implement fast sin/cos, or simd-group ops like 'call/ret' and 'simd_shuffle_down'
06:01dougallhmm, not that springs to mind... maybe the instructions that implement fast sin/cos, or simd-group ops like 'call/ret' and 'simd_shuffle_down'
06:06_whitelogger_ has quit [Remote host closed the connection]
06:09_whitelogger_ has joined #asahi-gpu
06:09_whitelogger_ has joined #asahi-gpu
06:24_whitelogger_ has quit [Remote host closed the connection]
06:26akemin_dayo has joined #asahi-gpu
06:27_whitelogger_ has joined #asahi-gpu
06:27_whitelogger_ has joined #asahi-gpu
08:21_whitelogger_ has quit [Remote host closed the connection]
08:24_whitelogger_ has joined #asahi-gpu
08:24_whitelogger_ has joined #asahi-gpu
08:30mjg59_ is now known as mjg59
08:30mjg59_ is now known as mjg59
09:27crabbedhaloablut has quit [Ping timeout: 240 seconds]
09:27crabbedhaloablut has quit [Ping timeout: 240 seconds]
09:28crabbedhaloablut has joined #asahi-gpu
09:28crabbedhaloablut has joined #asahi-gpu
10:19akemin_dayo has quit [Ping timeout: 256 seconds]
10:19akemin_dayo has quit [Ping timeout: 256 seconds]
10:27akemin_dayo has joined #asahi-gpu
10:27akemin_dayo has joined #asahi-gpu
11:24bloomdougall: not that I'm discouraging more r/e, but fast sin/cos is surprisingly uninteresting on GPUs
11:24bloomdougall: not that I'm discouraging more r/e, but fast sin/cos is surprisingly uninteresting on GPUs
11:29bloomMesa doesn't even ave asin/acos/atan acceleration wired up, it's lowered to a (iirc polynomial..?) approximation unconditionally :-P
11:29bloomMesa doesn't even ave asin/acos/atan acceleration wired up, it's lowered to a (iirc polynomial..?) approximation unconditionally :-P
11:56dougallheh - yeah, iirc they just use a couple of (hopefully) uninteresting instructions i haven't named yet, so it might be a good beginner instruction to re
11:56dougallheh - yeah, iirc they just use a couple of (hopefully) uninteresting instructions i haven't named yet, so it might be a good beginner instruction to re
12:14linuxgemini has joined #asahi-gpu
12:14linuxgemini has joined #asahi-gpu
12:41linuxgemini has quit [Read error: Connection reset by peer]
12:41linuxgemini has quit [Read error: Connection reset by peer]
12:56linuxgemini has joined #asahi-gpu
12:56linuxgemini has joined #asahi-gpu
13:52odmir has joined #asahi-gpu
13:52odmir has joined #asahi-gpu
14:02omoiti has joined #asahi-gpu
14:02omoiti has joined #asahi-gpu
14:10omoiti has quit [Read error: Connection reset by peer]
14:10omoiti has quit [Read error: Connection reset by peer]
14:10omoiti has joined #asahi-gpu
14:10omoiti has joined #asahi-gpu
14:45linuxgemini has quit [Read error: Connection reset by peer]
14:45linuxgemini has quit [Read error: Connection reset by peer]
15:16linuxgemini has joined #asahi-gpu
15:16linuxgemini has joined #asahi-gpu
16:20richbridger has joined #asahi-gpu
16:20richbridger has joined #asahi-gpu
16:22aquijoule__ has quit [Ping timeout: 265 seconds]
16:22aquijoule__ has quit [Ping timeout: 265 seconds]
17:31DarkShadow44dougall: Do you already have documentation prepared to device_store/device_load?
17:31DarkShadow44dougall: Do you already have documentation prepared to device_store/device_load?
17:31DarkShadow44Because for simplicity reason, I need those first to start with proper testing
17:31DarkShadow44Because for simplicity reason, I need those first to start with proper testing
17:31DarkShadow44if you don't have anything, maybe I could write something up?
17:31DarkShadow44if you don't have anything, maybe I could write something up?
17:32DarkShadow44on your github it's still maked TODO(), that's why I ask
17:32DarkShadow44on your github it's still maked TODO(), that's why I ask
18:39linuxgemini has quit [Write error: Connection reset by peer]
18:39linuxgemini has quit [Write error: Connection reset by peer]
18:40omoiti has quit [Ping timeout: 256 seconds]
18:40omoiti has quit [Ping timeout: 256 seconds]
18:50linuxgemini has joined #asahi-gpu
18:50linuxgemini has joined #asahi-gpu
18:51linuxgemini has quit [Remote host closed the connection]
18:51linuxgemini has quit [Remote host closed the connection]
18:52linuxgemini has joined #asahi-gpu
18:52linuxgemini has joined #asahi-gpu
20:44JusticeEX has quit [Ping timeout: 246 seconds]
20:44JusticeEX has quit [Ping timeout: 246 seconds]
21:29TheJollyRoger has quit [Ping timeout: 268 seconds]
21:29TheJollyRoger has quit [Ping timeout: 268 seconds]
21:32TheJollyRoger has joined #asahi-gpu
21:32TheJollyRoger has joined #asahi-gpu
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-gpu
23:01yrlf has joined #asahi-gpu
23:35JusticeEX has joined #asahi-gpu
23:35JusticeEX has joined #asahi-gpu