My first question: how to get the registration of the used information for the OpenCL kernel code on the Nvidia GPU, since nvcc-complier gives the same thing as the flag nvcc --ptxas-options=-vfor the CUDA kernel code.
I also received the same AMD GPU information for the OpenCL kernel, from the .isa fileone generated during program startup, after export GPU_DUMP_DEVICE_KERNEL=3. I also tried the same on the Nvidia GPU, but did not get it .isa file. My second question is: why does the Nvidia GPU not generate .isa file?
After googling, I found a way to get the registers and information used by shared memory for the OpenCL core on the Nvidia GPU - use the cl-nv-verbosestring flag in the call to the clBuildProgram () function. And then read the "binaries" of the slave kernel code information. My third question is, Is the correct way to get registers to use Nvidia GPU information? What are other ways to get the same?
// Build the program ...
clBuildProgram(program, 1, &device_id, "-cl-nv-verbose", NULL, NULL);
After creating the program, I used two constants CL_PROGRAM_BINARY_SIZES and CL_PROGRAM_BINARIESin the clGetProgramInfo () function to get the binaries of the compiled kernel code.
// Print binary files with slave kernel code ...
cl_uint program_num_devices, ret;
size_t t;
ret = clGetProgramInfo(program, CL_PROGRAM_NUM_DEVICES, sizeof(cl_uint), &program_num_devices, NULL);
if(program_num_devices == 0) {
printf("No valid device was found \n");
return ;
}
size_t binary_sizes[program_num_devices];
char **binaries = (char **) malloc(program_num_devices * sizeof(char* ));
ret = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, program_num_devices * sizeof(size_t), &binary_sizes, NULL);
for(t = 0; t < program_num_devices; t++) {
binaries[t] = (char *) malloc((binary_sizes[t] + 1) * sizeof(char));
}
ret = clGetProgramInfo(program, CL_PROGRAM_BINARIES, program_num_devices * sizeof(size_t), binaries, NULL);
for(t = 0; t < program_num_devices; t++) {
binaries[t][binary_sizes[t]] = '\0';
printf("Binary ISA Info%s : %lu \n", binaries[t], binary_sizes[t]);
}
printf("ProgramNumDevices:: %u\n", program_num_devices);
for(t = 0; t < program_num_devices; t++) {
free(binaries[t]);
}
" " OpenCl. , . ?
.
Advance!!!!