Skip to content

Commit

Permalink
remove some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Razdoburdin committed Jan 26, 2024
1 parent 5ea7624 commit 4d700bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
17 changes: 4 additions & 13 deletions plugin/sycl/common/partition_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ namespace common {
// The builder is required for samples partition to left and rights children for set of nodes
class PartitionBuilder {
public:
static constexpr size_t maxLocalSums = 256;
static constexpr size_t subgroupSize = 16;


template<typename Func>
void Init(::sycl::queue* qu, size_t n_nodes, Func funcNTaks) {
qu_ = qu;
Expand All @@ -53,11 +49,6 @@ class PartitionBuilder {
}
}

size_t GetSubgroupSize() {
return subgroupSize;
}


size_t GetNLeftElems(int nid) const {
return result_rows_[2 * nid];
}
Expand All @@ -67,11 +58,12 @@ class PartitionBuilder {
return result_rows_[2 * nid + 1];
}

// For test purposes only
void SetNLeftElems(int nid, size_t val) {
result_rows_[2 * nid] = val;
}


// For test purposes only
void SetNRightElems(int nid, size_t val) {
result_rows_[2 * nid + 1] = val;
}
Expand All @@ -82,18 +74,17 @@ class PartitionBuilder {

void MergeToArray(size_t nid,
size_t* data_result,
::sycl::event* event) {
::sycl::event event) {
size_t n_nodes_total = GetNLeftElems(nid) + GetNRightElems(nid);
if (n_nodes_total > 0) {
const size_t* data = data_.Data() + nodes_offsets_[nid];
qu_->memcpy(data_result, data, sizeof(size_t) * n_nodes_total, *event);
qu_->memcpy(data_result, data, sizeof(size_t) * n_nodes_total, event);
}
}

protected:
std::vector<size_t> nodes_offsets_;
std::vector<size_t> result_rows_;
std::vector<::sycl::event> nodes_events_;
size_t n_nodes_;

USMVector<size_t, MemoryType::on_device> parts_size_;
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/plugin/test_sycl_partition_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ TEST(SyclPartitionBuilder, BasicTest) {
std::vector<size_t> v(*std::max_element(rows.begin(), rows.end()));
size_t row_id = 0;
for(size_t nid = 0; nid < kNodes; ++nid) {
builder.MergeToArray(nid, v.data(), &event);
builder.MergeToArray(nid, v.data(), event);
qu.wait();

// Check that row_id for left side are correct
Expand Down

0 comments on commit 4d700bb

Please sign in to comment.