Closed GregoryKimball closed 1 year ago
Hello @GregoryKimball!
I'm using a string axis for enums and then converting the string to enum value. This is needed because the benchmark accepts many enum values. For your case, there might be only two values, so using an integer axis might be preferable:
void bench(nvbench::state &state)
{
cuio_source_sink_pair(state.get_int64("IsDeviceBuffer") ? io_type::DEVICE_BUFFER
: io_type::HOST_BUFFER);
// ...
}
NVBENCH_BENCH(bench)
.add_int64_axis("IsDeviceBuffer", {1});
Thank you @senior-zero, we will consider switching to string axes for our cuIO benchmarks. I'll close this issue, but if anyone else has thoughts on this topic - I would love to learn from your response as well!
We have several cuDF benchmarks for which I would like to run one value of an nvbench
enum_type_list
by default, and also be able to access the other values at runtime.In this case for parquet_reader_input, how can I write
BM_parquet_read_data
so that it only runscudf::io::io_type::DEVICE_BUFFER
by default and also--axis io=HOST_BUFFER
would work at runtime?I see the nvbench example in enums.cu - is the recommendation to convert the
NVBENCH_TYPE_AXES
into astring_axis
?