Skip to content

Commit

Permalink
Merge pull request #126 from frasercrmck/sub-group-size-1
Browse files Browse the repository at this point in the history
[mux] Advertise a sub-group size of 1
  • Loading branch information
frasercrmck authored Sep 12, 2023
2 parents 3a05571 + aba08ee commit 0260608
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/mux/targets/host/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ device_info_s::device_info_s(host::arch arch, host::os os, bool native,
this->sub_groups_support_ifp = false;
this->supports_work_group_collectives = true;
this->supports_generic_address_space = true;

static std::array<size_t, 1> sg_sizes = {
1, // we can always produce a 'trivial' sub-group if asked.
};
this->sub_group_sizes = sg_sizes.data();
this->num_sub_group_sizes = sg_sizes.size();
}

host::arch device_info_s::detectHostArch() {
Expand Down
6 changes: 6 additions & 0 deletions modules/mux/targets/riscv/source/device_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ device_info_s::device_info_s()
this->max_hardware_counters = std::numeric_limits<int>::max();
this->supports_work_group_collectives = true;
this->supports_generic_address_space = true;

static std::array<size_t, 1> sg_sizes = {
1, // we can always produce a 'trivial' sub-group if asked.
};
this->sub_group_sizes = sg_sizes.data();
this->num_sub_group_sizes = sg_sizes.size();
}

mux_result_t GetDeviceInfos(uint32_t device_types, uint64_t device_infos_length,
Expand Down

0 comments on commit 0260608

Please sign in to comment.