[Comgr] Port get_data_isa_name_test from CTest to LIT#2750
Conversation
Ports get_data_isa_name_test to LIT and splits into two separate tests, isa-enumeration and get-data-isa-name.
|
Note: dropping of all the Comgr pipeline/compilation steps is intentional, as we already cover those in other tests (better for this test to be more focused) |
|
Does the isa-enumeration test add value? I'm wondering if we should drop it completely. The old test used amd_comgr_get_isa_name() to generate ISA names for the get_data_isa_name() testing. We could get fancy and do something similar: // RUN: for isa in $(isa-enumeration); do Also, one thing we're missing: xnacx/sramecc coverage. We should add that as well |
Co-authored-by: Jacob Lambert <[email protected]>
| //strncpy(IsaName, Name, MAX_ISA_NAME_SIZE); | ||
| //printf("%s\n", IsaName); |
There was a problem hiding this comment.
commented out code should be removed ?
There was a problem hiding this comment.
please run patch through git-clang-format to clean up arbitrary trailing spaces
|
|
||
| Size = setBuf(argv[1], &Buf); | ||
|
|
||
| amd_comgr_(create_data(AMD_COMGR_DATA_KIND_RELOCATABLE, &Data)); |
… added feature enumeration to isa-enumeration source. Now, running get-data-isa-name will iterate isa-enumeration over all features and then get-data-isa-name is called on each ISA and their respective valid features.
| @@ -0,0 +1,10 @@ | |||
| // COM: Test Comgr get_data_isa_name() API | |||
| // RUN: mapfile -t isa_arr < <(./isa-enumeration) | |||
There was a problem hiding this comment.
mapfile is unlikely to be available on Windows. Ensure tests are compatible on both platforms
There was a problem hiding this comment.
Check other tests on how binaries are invoked
There was a problem hiding this comment.
How does this loop actually work ? Does it swallow errors in tests that isnt the last one ?
Can we figure out a way to do this across Windows and Linux ?
There was a problem hiding this comment.
The first line takes the stdout from isa-enumeration and treats it as stdin for mapfile. mapfile takes an stdin input and stores newline separated values in an array. Next line is for each on that isa_array. Then strip all elements in the isa name before -- to get the gpu name, etc. I think the easiest alternative would be to do all of the test in C++ and just call that test through LIT.
|
Branch has merge conflicts. rebase against |
|
This branch has merge conflicts that need to be fixed before CI can run |
|
Please resolve my comments on this thread : #2750 (comment) |
Understood, raised the review to make sure all the other issues have been addressed properly. |
Right, no problem. We usually try to address all posted review comments and then re-requesting reviews. Its a better use of reviewer context switch and reduces the back and forth. |
Ports get_data_isa_name_test to LIT and splits into two separate tests, isa-enumeration and get-data-isa-name. Fixes Issue #2711.