Can’t seem to get concurrent read work (in order to speed up )
here is my config
cfg["sm.compute_concurrency_level"] = 10;
cfg["sm.io_concurrency_level"] = 10;
cfg["vfs.min_parallel_size"] =
10485760; // set it to default for now ,yet to figure out how to use it
// (set it too small as 100k seems to slow down read)
and here is my tile 2d array layout
domain.add_dimension(tiledb::Dimension::create<int>(
ctx, "cell", {1, ncell},
ncell)); // @suppress("Invalid arguments") // @suppress("Symbol is not
// resolved")
domain.add_dimension(tiledb::Dimension::create<int>(
ctx, "channel", {1, nch == 0 ? 1 : nch},
1)); // @suppress("Invalid arguments") // @suppress("Symbol is not
// resolved")
tiledb::ArraySchema schema(ctx, TILEDB_DENSE);
schema.set_domain(domain);
schema.add_attribute(tiledb::Attribute::create<float>(ctx, "mat"));
schema.set_tile_order(TILEDB_COL_MAJOR).set_cell_order(TILEDB_COL_MAJOR);
basically store cells x channels 2d array, each row is a cell, each col is a channel, and access pattern is reading by channel, thus I am tiling by channel.
I wonder how the concurrent read request can be applied here to optimize reading multi-channel at once, say using 10 threads to fetch 10 channels concurrently.
here is what my query looks like
tiledb::Query query(*ctxptr_, *mat_array_ptr_);
query.set_layout(TILEDB_COL_MAJOR);
int ncol = 0;
int nrow = 0;
int dim_idx = 0;
ncol = cidx.size();
nrow = dims[0];
dim_idx = 1;
query.add_range<int>(0, 1, nrow); // select all rows
// tiledb idx starting from 1
for (int i : cidx) {
query.add_range<int>(dim_idx, i + 1, i + 1);
}
arma::Mat<float> buf(nrow, ncol);
query.set_buffer("mat", buf.memptr(), nrow * ncol);
query.submit();
query.finalize();
Hope someone can point me to the right direction here