[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.
| const char *V4Options[] = {"-mcode-object-version=4"}; | ||
| size_t V4OptionsCount = sizeof(V4Options) / sizeof(V4Options[0]); | ||
|
|
||
| const char *V6Options[] = {"-mcode-object-version=6"}; | ||
| size_t V6OptionsCount = sizeof(V6Options) / sizeof(V6Options[0]); |
There was a problem hiding this comment.
What would this entail? Should the LIT test try to compile with COV4, COV6, and no COV flag for each .o and .so?
There was a problem hiding this comment.
Sure. Even though COV4 is deprecated, we'd probably like to check coverage until its support is entirely removed
| @@ -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
|
Branch has merge conflicts. rebase against |
Ports get_data_isa_name_test to LIT and splits into two separate tests, isa-enumeration and get-data-isa-name. Fixes Issue #2711.