Logs: freenode/#haskell
| 2021-04-26 15:03:28 | <tomsmeding> | cheater: replicate your 1x5 vector up to 100x5, zipWith (*), then sum the inner (5) dimension |
| 2021-04-26 15:03:56 | <tomsmeding> | assumes Z :. 100 :. 5 matrix and a Z :. 1 :. 5 vector |
| 2021-04-26 15:04:33 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 2021-04-26 15:04:45 | <cheater> | tomsmeding: i don't want to have to create twelve gigabytes that are just the same 1kB vector repeated, that would be very bad for perf |
| 2021-04-26 15:04:58 | → | fiedlr joins (~fiedlr@83.148.33.254) |
| 2021-04-26 15:05:01 | <sshine> | jumper149, ah, type-class constraints |
| 2021-04-26 15:05:10 | <tomsmeding> | cheater: let I2 n len = shape matrix in sum (zipWith (*) matrix (replicate (I2 n len) vector)) |
| 2021-04-26 15:05:20 | <tomsmeding> | that 'replicate' isn't actually going to be manifested in memory |
| 2021-04-26 15:05:30 | <cheater> | really? |
| 2021-04-26 15:05:41 | <cheater> | how do you know? |
| 2021-04-26 15:05:52 | <tomsmeding> | it's going to be fused into the zipWith, which itself is going to be be a "virtual" (delayed, officially) array as argument to the fold |
| 2021-04-26 15:05:58 | <tomsmeding> | cheater: 1. because I work on accelerate :) |
| 2021-04-26 15:06:04 | <tomsmeding> | 2. because you can see what happens in the Show output |
| 2021-04-26 15:06:08 | <cheater> | that's cool thank you |
| 2021-04-26 15:06:16 | <cheater> | i don't know what Show would display |
| 2021-04-26 15:06:22 | <cheater> | i'm only getting started with accelerate |
| 2021-04-26 15:06:45 | <tomsmeding> | if you 'show' a value of type 'Acc something', it gives you the optimised version after fusion |
| 2021-04-26 15:06:45 | <cheater> | and this will work the same way with accelerate-llvm-ptx? |
| 2021-04-26 15:06:52 | <tomsmeding> | yup |
| 2021-04-26 15:06:58 | <tomsmeding> | fusion is backend-independent |
| 2021-04-26 15:07:10 | × | zmijunkie1 quits (~Adium@109.90.32.89) (Ping timeout: 252 seconds) |
| 2021-04-26 15:07:27 | <cheater> | nice thank you |
| 2021-04-26 15:07:28 | <cheater> | btw |
| 2021-04-26 15:07:38 | <cheater> | do you have any interest in getting llvm-ptx working on windows? |
| 2021-04-26 15:07:47 | <cheater> | because i know what would need to be done |
| 2021-04-26 15:07:55 | <cheater> | even if i'm missing some of the knowledge how to do it |
| 2021-04-26 15:08:46 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-26 15:09:03 | <tomsmeding> | please open an issue on the github repo! |
| 2021-04-26 15:09:15 | <cheater> | i mean |
| 2021-04-26 15:09:18 | <tomsmeding> | we're certainly interested in making it more cross-platform if it isn't already |
| 2021-04-26 15:09:18 | <cheater> | it involves fixing llvm |
| 2021-04-26 15:09:19 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-04-26 15:09:22 | <tomsmeding> | lol |
| 2021-04-26 15:09:33 | <cheater> | and then fixing... uh... what's the thing that invokes the linker? it's not cabal |
| 2021-04-26 15:09:35 | <tomsmeding> | can't be done from within accelerate, you mean? |
| 2021-04-26 15:09:41 | × | xff0x quits (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 265 seconds) |
| 2021-04-26 15:09:53 | <cheater> | no, llvm needs to be fixed, but if we're lucky then it's a lightweight fix |
| 2021-04-26 15:10:17 | <tomsmeding> | that's... interesting |
| 2021-04-26 15:10:20 | <tomsmeding> | cheater: https://gitter.im/AccelerateHS/Lobby |
| 2021-04-26 15:10:32 | <tomsmeding> | lead maintainer of accelerate is in there (trevor) |
| 2021-04-26 15:10:50 | <tomsmeding> | please stop by if you're interested, he knows more about the actual backends than I do :) |
| 2021-04-26 15:11:09 | → | xff0x joins (~xff0x@2001:1a81:53aa:e600:aedf:66c8:4911:fe15) |
| 2021-04-26 15:11:26 | <tomsmeding> | (If you don't like gitter I can also proxy here on irc :p) |
| 2021-04-26 15:11:55 | <cheater> | i'm there |
| 2021-04-26 15:13:07 | → | stree joins (~stree@68.36.8.116) |
| 2021-04-26 15:13:13 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 2021-04-26 15:13:16 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-79-166.w86-212.abo.wanadoo.fr) |
| 2021-04-26 15:14:15 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:bde3:c459:7b57:e4c8) |
| 2021-04-26 15:15:01 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 2021-04-26 15:15:33 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:bde3:c459:7b57:e4c8) (Remote host closed the connection) |
| 2021-04-26 15:15:57 | → | Guest6509 joins (~laudiacay@45.162.228.190) |
| 2021-04-26 15:16:24 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:bde3:c459:7b57:e4c8) |
| 2021-04-26 15:17:28 | → | thunderrd joins (~thunderrd@183.182.110.191) |
| 2021-04-26 15:17:39 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-04-26 15:18:43 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:bde3:c459:7b57:e4c8) (Remote host closed the connection) |
| 2021-04-26 15:19:00 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:bde3:c459:7b57:e4c8) |
| 2021-04-26 15:20:21 | × | Guest6509 quits (~laudiacay@45.162.228.190) (Ping timeout: 252 seconds) |
| 2021-04-26 15:21:36 | → | nicholasbulka joins (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) |
| 2021-04-26 15:21:41 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 2021-04-26 15:22:12 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-109-140.dsl.telepac.pt) (Read error: Connection reset by peer) |
| 2021-04-26 15:22:48 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-109-140.dsl.telepac.pt) |
| 2021-04-26 15:23:19 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 2021-04-26 15:25:15 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-79-166.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 2021-04-26 15:25:26 | <tomsmeding> | cheater: https://paste.tomsmeding.com/pOMX0Nfd |
| 2021-04-26 15:25:32 | <tomsmeding> | that's in ghci |
| 2021-04-26 15:25:49 | × | nicholasbulka quits (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) (Ping timeout: 245 seconds) |
| 2021-04-26 15:26:14 | <cheater> | neato |
| 2021-04-26 15:26:39 | <tomsmeding> | note that the program (apart from the use calls, of course) is just a single 'fold' (for the sum) with a delayed argument. That "delayed" is just like "generate", except it isn't actually constructed in memory |
| 2021-04-26 15:26:55 | <cheater> | i don't know what generate is |
| 2021-04-26 15:27:14 | <tomsmeding> | cheater: https://hackage.haskell.org/package/accelerate-1.3.0.0/docs/Data-Array-Accelerate.html#v:generate |
| 2021-04-26 15:27:18 | <cheater> | yep |
| 2021-04-26 15:27:20 | <cheater> | i'll read the docs |
| 2021-04-26 15:27:29 | <cheater> | just telling you that i don't know it immediately |
| 2021-04-26 15:27:31 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-79-166.w86-212.abo.wanadoo.fr) |
| 2021-04-26 15:27:33 | <tomsmeding> | if the expressions don't look all that optimised: don't worry, expressions are optimised by llvm afterwards :) |
| 2021-04-26 15:27:39 | <cheater> | this code isn't easy to read haha |
| 2021-04-26 15:27:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-04-26 15:27:48 | <cheater> | i'll need to break it down |
| 2021-04-26 15:27:52 | <tomsmeding> | no post-fusion code can be hard to read sometimes :p |
| 2021-04-26 15:28:11 | <cheater> | ah wait |
| 2021-04-26 15:28:19 | <ski> | @let tabulate :: Ix i => (i,i) -> (i -> e) -> Array i e; tabulate ix f = listArray ix [f i | i <- range ix] |
| 2021-04-26 15:28:20 | <cheater> | i'm reading the show output |
| 2021-04-26 15:28:21 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-79-166.w86-212.abo.wanadoo.fr) (Client Quit) |
| 2021-04-26 15:28:21 | <lambdabot> | Defined. |
| 2021-04-26 15:28:22 | <cheater> | duh |
| 2021-04-26 15:28:24 | <tomsmeding> | mostly important is the structure I pointed out; the details of what goes on in the scalar expressions is less important |
| 2021-04-26 15:29:10 | <tomsmeding> | ski: indeed :p |
| 2021-04-26 15:29:39 | <tomsmeding> | in fact, futhark calls the same operation 'tabulate' where accelerate calls it 'generate' |
| 2021-04-26 15:30:04 | → | rekahsoft joins (~rekahsoft@52.129.35.150) |
| 2021-04-26 15:31:19 | <tomsmeding> | cheater: I gotta go for now, for questions later don't hesitate to ask e.g. in the gitter :) |
| 2021-04-26 15:31:26 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 2.8) |
| 2021-04-26 15:31:42 | → | nicholasbulka joins (~nicholasb@2601:900:4301:da0:58e6:3a0a:96a:ca2c) |
| 2021-04-26 15:32:32 | <sshine> | tomsmeding, 'tabulate' comes from Standard ML's List.tabulate, I'm sure. |
| 2021-04-26 15:32:34 | <cheater> | tomsmeding: thanks, really appreciated |
| 2021-04-26 15:32:39 | × | Guest45273 quits (sid175221@gateway/web/irccloud.com/x-xfqbqidhzrwpebvs) () |
| 2021-04-26 15:32:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-04-26 15:33:27 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:f023:81fa:fbf5:ef93) (Ping timeout: 260 seconds) |
| 2021-04-26 15:33:30 | → | Guest45273 joins (sid175221@gateway/web/irccloud.com/x-uaihrvmovkrsrqze) |
| 2021-04-26 15:34:16 | → | ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-26 15:34:20 | × | Guest45273 quits (sid175221@gateway/web/irccloud.com/x-uaihrvmovkrsrqze) (Client Quit) |
All times are in UTC.