[CK] Add command option instance_index and param_mask to run partial ck test (#2889)

* [CK] Add command option instance_index and param_mask to run partial ck test

Many CK test are instance test. it will loop all instance in the instance library. It causes test often out-of-time if we run test on simulator/emulator.
This PR add option instance_index and param_mask to reduce the workload of instance test

instance_index: only run test 1 available instance with specified index.
param_mask: filter the embedded parameter with specified mask

* fix CI error

* fix clang format

---------

Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>
This commit is contained in:
linqunAMD
2025-09-30 23:24:40 +08:00
committed by GitHub
parent 28ad8ae5d8
commit e78a897ec0
113 changed files with 2804 additions and 704 deletions

View File

@@ -56,10 +56,27 @@ __host__ void cpu_magic_number_division(uint32_t magic_multiplier,
}
}
int main(int, char*[])
int main(int argc, char* argv[])
{
uint64_t num_divisor = 4096;
uint64_t num_dividend = 1L << 16;
uint64_t num_divisor = 4096;
uint64_t num_dividend = 1L << 16;
uint32_t divisor_start = 0;
uint32_t divisor_end = num_divisor;
if(argc == 1)
{
// use default range
}
else if(argc == 3)
{
divisor_start = std::stoi(argv[1]);
divisor_end = std::stoi(argv[2]);
}
else
{
std::cerr << "arg1 to 2: divisor_start divisor_end" << std::endl;
return 1;
}
std::vector<int32_t> divisors_host(num_divisor);
std::vector<int32_t> dividends_host(num_dividend);
@@ -90,6 +107,10 @@ int main(int, char*[])
for(std::size_t i = 0; i < num_divisor; ++i)
{
if(i < divisor_start || i > divisor_end)
{
continue;
}
// run naive division on GPU
gpu_naive_division<<<1024, 256>>>(
divisors_host[i],