Opened 6 years ago

Closed 6 years ago

#27 closed defect (invalid)

Invalid binaries when assembling from source using .kernel .config versus .metadata

Reported by: NDBob95 Owned by: matszpk
Priority: major Milestone:
Component: CLRXAll Version:
Keywords: Cc:

Description

Not sure if this is a known issue or if I am missing something in the documentation. I have been experimenting with your assembler/disassembler for a project I'm working on and I'm having trouble utilizing LDS from my custom code. Here is what I am seeing:

1) I take a saved binary of my original OpenCL code which works and disassemble using "clrxdisasm --all".

2) I rebuild the binary from source as-is using "clrxasm --64 --gpuType Ellesmere" using the raw disassembler output (with binary kernel metadata and setup) and it runs fine.

3) I take the same binary and disassemble with text config using "clrxdisasm --config --all".

4) I rebuild the binary from the text config source and it does not appear to be able to access LDS --- Operations not involving LDS are returning correct answers, the CodeXL Profiler shows LDS instructions being executed, but there is no data returned by any of the LDS path operations.

5) I disassemble the second binary using "clrxdisasm --all" to compare ---
the two are identical except for the .kernel section, where the ".config" based binary appears to be missing a substantial amount of configuration metadata. Both binaries disassemble to the same text based config output:

.dims x
.cws 8, 8, 1
.sgprsnum 22
.vgprsnum 84
.localsize 4096
.floatmode 0xc0
.pgmrsrc1 0x00ac0094
.pgmrsrc2 0x0000088c
.dx10clamp
.ieeemode
.useargs
.priority 0
.arg _.global_offset_0, "size_t", long
.arg _.global_offset_1, "size_t", long
.arg _.global_offset_2, "size_t", long
.arg _.printf_buffer, "size_t", void*, global, , rdonly
.arg _.vqueue_pointer, "size_t", long
.arg _.aqlwrap_pointer, "size_t", long
.arg input, "ulong*", ulong*, global, , rdonly
.arg Scratchpad, "uint4*", uint4*, global,
.arg states, "ulong*", ulong*, global,

Change History (4)

comment:1 Changed 6 years ago by matszpk

Thank you for report bug. Because not all of fields in kernel config is required to correct working, please remove .pgmrsrc1 and .pgmrsrc2 fields (pseudo-ops). Assembler will calculate values of PGMRSRC1 and PGMRSRC2 from rest of the fields.

comment:2 Changed 6 years ago by matszpk

Can you tell me, what are you using version of CLRX?

comment:3 Changed 6 years ago by NDBob95

Hmm, I thought I had tried that but I've just tried again with the sample I'm using at I think it may be working. Using 1.5.1rc1 btw. I'll do further testing and close the ticket in a few days if I don't run into any more issues. Thanks.

comment:4 Changed 6 years ago by NDBob95

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.