Updates - hyqneuron/asfermi GitHub Wiki

21th January, 2012

mmarc__ added memory cleanups and uberkern test.


13th January, 2012

mmarc__ contributed a patch that enables asfermi to work as a library to write the assembled cubin or just the .text section (the raw instruction opcodes) into an iostream. This patch is currently under the libasfermi branch.


10th August, 2011

  1. Added support of more Special Registers for S2R;
  2. Added a new Directive "Label". Instructions that use instruction offset as argument can now use labels instead of real offset.
  3. Resolved some known issues regarding the register count.
  4. Fixed some parts in the documentation for the data movement instructions.
  5. Renamed the svn directories. The previous /trunk is now /asfermiOld. The current branch has been shifted from /ph to /trunk.

9th August, 2011

  1. Added support for SSY, JMP, JCAL, PLONGJMP, LONGJMP, PSETP, B2R.
  2. All the must-have instructions are now supported. Going into stage 2 of the project next week.

8th August, 2011

Fixed a few bugs that caused launch failure. Tested a simple cubin generated by asfermi on a 64-bit machine with CentOS 5.5 and a Tesla C2050. Result was correct.


7th August, 2011

  1. Fixed a few things that didn't go through with g++.
  2. Added a makefile(generated.txt) as well as the makefile used to generate it(genmake.txt).

6th August, 2011

Added support for more directives. Documentation is here.

2pm: added support for BAR, MEMBAR, ATOM, RED and VOTE.

6pm: Uploaded a new cubinEditor to the Downloads page. 64-bit cubin can now be viewed using the cubinEditor v5.

11pm: Changed all backward slashes to forward slashes. Added support for 64-bit cubin generation in asfermi. See Usage. Please note that it is most likely that the 64-bit cubin generated would not work as expected, even though cuobjdump now correctly identifies it. I'll need better Internet connection than what I'm having now to test things on a server.


5th August, 2011

Somehow the code commit yesterday seems to have not actually reached the svn repository. I'll do it again later.

Update: The commit is done. r515.


4th August, 2011

Added support for LEPC, CCTL, CCTLL, LDLK, LDSLK, STUL, STSUL, PBK, BRK, PCNT and CONT.


2nd August, 2011

Added support for BFE, BFI, SEL and MUFU.


1st August, 2011

Added support for IMUL32I, ISCADD, ICMP and FCMP


29th July, 2011

  1. Fixed things for some float/integer instructions and added support for more operators of those instructions.
  2. Added support for LOP32I, DADD, DMUL, DFMA and DSETP.

27th July, 2011

hyq.neuron:

  1. added support for SHL and SHR
  2. code is only uploaded to the ph branch. Files under the ph branch uses stdafx.h, the default pre-compiled header file for VS.

23rd July, 2011

hyq.neuron:

  1. asfermi has 2 more members in the team now.
  2. Added support for I2I and F2F.
  3. Created a branch under the folder /ph with all the re-written, proper .h and .cpp files(under /trunk, the main branch, there is only a single .cpp file). Though compilation time still seems too long in VS.

16th July, 2011

Added support for .shared, .local and .nv.constant2 cubin sections. Documentation will come later.

6pm: Added support for LDC, LDU, LDL and STL. Cache operators are now supported as well.


12th July, 2011

Added support for LOP, RET, PRET, BRA, CAL, STS, LDS.


11th July, 2011

Added support for IMUL and FMUL. Things are done in a rush so there should be some errors. Also changed the documentation by quite a lot.

11pm: added support for IMAD and FFMA. Haven't had the chance to check the issue regarding the immea bits for constant memory yet.


10th July, 2011

Added support for ISETP, FSETP and S2R. Don't have time to do much documentation for now.


5th July, 2011

Added support for the -sm_20 an -sm_21 command-line arguments and the Arch directive.

Quite a lot of little yet important things are not done. For one, asfermi still doesn't support 64-bit cubin.


3rd July, 2011

Just got an "asfermied" cubin kernel to run on my device! I'm surprised by how few mistakes I've made :) I'll do a few more tests before I upload the code.

Okay did another test with passing parameter. Worked as expected. I'll upload the code when I get some stable Internet.

Currently support 3 directives: !Kernel kernelname, EndKernel, !Param paramsize [count of params with the same size]

Code's been uploaded. Next week I'll be adding support for more instructions.

Forgot to mention one thing: my device is CC2.1 so asfermi is now configured to output kernels as sm_21 kernel. To change this the Flags value of ELFHeader32(at the beginning of cubin.h) needs to be changed to 0x00140114(sm_20).


2nd July, 2011

Just finished coding for direct cubin output. May take some time to debug, though. Hope I can upload the code tomorrow.


28th June, 2011

Just finished another exam. School has started again. How much time I could have for asfermi during the next few months is uncertain. I'll try to get direct cubin output to work over the weekend.


20th June, 2011

Just broke my Win7 while trying to fix a friend's HDD. If I can't fix my Win7 in half an hour there will be more delays because my card doesn't run on Linux :(

4pm: My partition table is totally screwed. Wasted so much time waiting for my system to discharge fully so as to get the LCD to light up... maybe it's time to leave my 5-year-old friend behind...

7pm: Almost forgot I had 2 backup hard drives. Now I'm back on a Win7 that works with my GTX 460. I should never power off my laptop again.

1130pm: I'm caught by more troubles that I can describe. Another exam is coming and I guess there's no need for the regular visitors to come here until next Thursday. Sorry for the horribly slow progress.


19th June, 2011

Was in some trouble and did not do anything during the past two days. Everything getting pushed back.

5pm: Okay, most of the things I need are more or less already known at this point. I might be able to start coding tomorrow.

16th June, 2011

Experimented quite a bit with cubins today. Still not clear how the content of these sections work: .nv.info.kernelname and .nv.info. I have some clues, but still haven't figured out the strict rules by which those .info sections are built.

The other sections and segments of the cubins seem pretty eazy. I'm not going to deal with texture symbols in the short term, though.


15th June, 2011

Floating number and integer constants are now supported. Block and in-line comments are supported as well. Code uploaded.

Tomorrow I'll start looking into nvidia's custom sections in cubins and start working on the support for producing cubins independently.


14th June, 2011

Confirmed that FADD and IADD do take 20-bit immediates.

Hmm... looks like the first version is ready. asfermi now has support for predicates. Support for instructions is limited to: MOV, ST, LD, FADD and IADD. So far the only supported modifiers are .128 and .64 for both LD and ST. For now only hexadecimal immediate values are accepted. I'll get asfermi to support floating point/integer number immediate values soon. Then I'll add support for operand types used by S2R and SETP instructions. When these things are done, I will just start adding support for a lot more instructions and their modifiers.

Forgot to mention one thing: asfermi doesn't properly support comments yet. Though since asfermi does syntax checking in a very slack manner, comments could actually be inserted into instructions. See SourceFormat for information regarding this.


13th June, 2011

630pm: Back on the job! Just added support for predicates and .128, .64 modifiers for LD and ST. Now working on the operand type for constant memory. Haven't uploaded the code yet.


10th June, 2011

11am: Things to do:

  • add support for modifiers
  • add proper error handler
  • debug (memory leaks, especially)
  • reorganise code (move some functions out of their class...)

330pm: Hmm.. looks like memory leaks are not as hard to eliminate as I had imagined. I still have a lot of doubts about how C++ memory management works, but my leak detector already says no leak found, so I'll just go work on something else.

5pm: I think I'll take a break for a few days.


9th June, 2011

7pm: Finally, asfermi is assembling! Now I'll clean up my code, debug it a bit and then upload it before I go to bed.

11pm Well, due to my inexperience with C++, I got bogged down by quite a lot of things, from file operation, pointer operations to constructor use and many others. Anyway, asfermi now assembles! This version is not even supposed to be a working version, though it does demonstrate a few features. Anyway, I'll just upload the code since at least it worked for the file that I tested. Okay, it's uploaded to svn/trunk/ .

Supported instruction: ST, LD, EXIT. Supported operand types: register(Rxx), global memory( [Rxx + 0x........] ). I'll write a bit documentation tomorrow. Now it's really time for bed.


8th June, 2011

12am: Spent the last day debugging and fixing the potential performance issues. The first release should be within 2 days.

10pm: cuobjdump seems to be suggesting that even FADD supports 16-bit immediate value. I think it's cuobjdump's bug, but I can't verify now because my laptop is not connected to the graphics card. Yes my laptop uses a desktop card. It needs to be restarted to connect. But restarting has 50% probability of causing the LCD to black out for quite some time (some problem with CMOS, I guess). I'll leave that for tomorrow.


6th June, 2011

5pm: Spent 5 hours coding today. I think I'll take a break for now. Progress is better than I imagined. I'm now at the stage of writing instruction-specific parsing functions. Also, there are quite a lot of performance issues I could foresee, but I'm not bothered to make any change for now.


5th June, 2011

I've been having headache since yesterday afternoon. Things may slow down a little.

11pm: My headache is gone, but progress is rather slow, because I'm learning C++'s various features and coding at the same time. I just reinvented an exception handling mechanism before I realized that C++ does have support for proper exception handling. Also, I wanted to use C#'s naming convention, but soon realized that Visual Studio's Intellisense didn't work as well as I had expected, so the long variable names required by C#'s naming convention would be too much a pain to live with.

Well, maybe the first release, supporting MOV, LD, ST, EXIT, FADD, IADD and capable of only replacing opcodes in existing kernels, will not come until at least 3 days later (after 8th June).


4th June, 2011

Exam's over! I'll start coding for asfermi now!


31st of May, 2011

Created the Google Group asfermi.