5/7/2023 0 Comments Visual studio code archIf I just specify -code=sm_52 what will happen then? Only machine code for V5.2 will be embedded that has been created out of V5.2 PTX code? And what would be the difference to -code=compute_52? If I specify for example -arch=compute_30 -code=sm_52, does that mean my code will first be compiled to feature level 3.0 PTX from which afterwards machine code for feature level 5.2 will be created? And what will be embedded? However, it is not clear which PTX or binary code will be embedded in the binary. Now, -code is supposed to specify which architectures the PTX code is assembled and optimised for. However, this PTX code is not automatically compiled to machine code, but this is rather a "preprocessing step". The documentation states that -arch specifies the virtual architectures for which the input files are compiled. The flag -arch only takes identifiers for virtual architectures (such as compute_XX) whereas the -code flag takes both, identifiers for real and for virtual architectures. Now, according to this apart from the two compiler flags there are also two ways of specifying architectures: sm_XX and compute_XX, where compute_XX refers to a virtual and sm_XX to a real architecture. I am aware that there is machine code as well as PTX code embedded in my binary and that this can be controlled via the controller switches -code and -arch (or a combination of both using -gencode). I am still not sure how to properly specify the architectures for code generation when building with nvcc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |