Optimal instructions scheduling is NP-hard task. For this reason almost all compilers implement metaheuristic methods like list scheduling/Gibbons–Muchnick algorithm etc. ptxas is no exception - it also generates non-optimal scheduling, and this opens some opportunity for automatic optimization....
Parts 1, 2 & 3First of all, it should be noted that the mask of instruction attributes has size 20 bytes, so I updated dump for them.structure for this attributes descriptor has size 0xd8 bytes and some fields:mask at offset 0name of instruction at 0xC8index at 0xD0 Instructions selecting...
Parts 1 & 2Pseudo instructionsSurprise-surprise - some PTX instructions not mapped directly to underlying SASS 1:1. Instead they generate lots of another PTX code. I already extracted their decrypted bodies, so it's time to describe how they connected to specific PTX pseudo instructions There...
Part 1PTX instructions that cicc cannot generateWhile reverse-engineering Nvidia's compilation pipeline, I extracted the set of PTX instructions that cicc (the CUDA C++ frontend) is capable of emitting. The next logical step is to intersect them with full set of instructions accepted by ptxas - so...
DisclaimerHighly likely that author is an illiterate, inattentive, and incompetent lazy person with a poor imagination - therefore his hypotheses may be questionable, ideas delusional and his analysis simply incorrect. Also maybe I still haven't mastered ida pro in 28 years so extracted data can...
After extracting latency table I became curious how good the code produced by ptxas. Projects like CuAsmRL never estimated limits of profit after rescheduling - it's strange and looks even worse than famous "proof left as an exercise to the reader" - what if ptxas generates perfect code and there...
inconvenient cuda-gdb can't automatically processing them - you need explicitly say something liketarget cudacore /full/path/to/coredumpand then type lots of info cuda XXX So last weekend I wrote tool to parse/dump CUDA coredumps and it even works on machine without CUDA SDK (what might be useful...
Perl. Developed and tested with Perl 5.40.0.use v5.40; my @grid; open DATA, q/data/; while(<DATA>){ chop; push @grid, $_; } close(DATA); my $format = build_unpack_format(@grid); @grid = (); open DATA, q/data/; while(<DATA>){ chop; my @fields = unpack $format, $_;...
Perl. Developed and tested with Perl 5.42.0.use v5.42; my @grid; open DATA, q/data/; while(<DATA>){ chomp; push @grid, [split //, $_]; } my @forklift_accessible; { my @accessible = (); for my $i (0 .. @grid - 1){ my $row = $grid[$i]; for my $j (0 .. @{$row}...
In these difficult times, no one wants to report bad or simply weak results (and this will destroy this hypocritical civilization). Since this is my personal blog and I am not looking for grants, I don't care.Let's dissect one truly inspiring paper - they employed reinforcement learning and claim...
Lets continue to compose some useful things based on perl driven Ced. This time I add couple of new options to test script dg.pl for registers reusingWhat is it at all? Nvidia as usually don't want you to know. It implemented in SASS as set of operand attributes "reuse_src_XX" and located usually...
Finally I add registers tracking in my perl sass disasmNow I can do some full-featured analysis of sass - like find candidates pairs of instruction to swap/run them in so called "dual" mode - and all of this in barely 1200 LoC of perl codeLet's think what must mean for couple of instructions to be...
as an illustration of the use of the modules presented in my previous post I made yet another sass disasm - fully written on Perl. It is almost exact copy of my nvd - implemented just in 460 LoC, the only unsupported feature is registers tracking - bcs I still don't make perl binding for it. What...
After playing a bit with my ced I came to the conclusion that implemented DSL for editing is not enough - like it would be good to have subroutines to patch repeated/similar instructions, check that patched instruction is what I want, patch attributes/relocs etcIn other words, I need full-fledged...
I want to stream my logs on my home RPi3b to a Slack channel for my vacation side project. With some searches I found an article including a simple shell script to implement this function: "Stream Any Log File to Slack Using curl". However it's a little tricky as the script replaces " to ' as...