Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sminakov-tt committed Feb 25, 2025
1 parent 57cb222 commit d8834f1
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions ttnn/cpp/pybind11/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,39 +260,39 @@ void device_module(py::module& m_device) {
Args:
sub_device_manager_id (SubDeviceManagerId): The ID of the sub-device manager to remove.
)doc")
.def(
"set_sub_device_stall_group",
[](IDevice* device, const std::vector<SubDeviceId>& sub_device_ids) {
device->push_work([device, sub_device_ids] { device->set_sub_device_stall_group(sub_device_ids); });
},
py::arg("sub_device_ids"),
R"doc(
.def(
"set_sub_device_stall_group",
[](IDevice* device, const std::vector<SubDeviceId>& sub_device_ids) {
device->push_work([device, sub_device_ids] { device->set_sub_device_stall_group(sub_device_ids); });
},
py::arg("sub_device_ids"),
R"doc(
Set the SubDevice IDs that will be stalled on by default for Fast Dispatch commands such as reading, writing, synchronizing.
Stalling here refers to the Fast Dispatch cores waiting for programs to complete execution on the specified SubDevices before proceeding with the specified instruction.
The default SubDevice IDs to stall on are set to all SubDevice IDs, and whenever a new SubDevice Manager is loaded.
Args:
sub_device_ids (List[SubDeviceId]): The IDs of the SubDevices to stall on.
)doc")
.def(
"reset_sub_device_stall_group",
[](IDevice* device) { device->push_work([device] { device->reset_sub_device_stall_group(); }); },
R"doc(
.def(
"reset_sub_device_stall_group",
[](IDevice* device) { device->push_work([device] { device->reset_sub_device_stall_group(); }); },
R"doc(
Resets the sub_device_ids that will be stalled on by default for Fast Dispatch commands such as reading, writing, synchronizing
back to all SubDevice IDs.
)doc")
.def(
"sfpu_eps",
[](IDevice* device) { return tt::tt_metal::experimental::hal::get_eps(); },
R"doc(Returns machine epsilon value for current architecture.)doc")
.def(
"sfpu_nan",
[](IDevice* device) { return tt::tt_metal::experimental::hal::get_nan(); },
R"doc(Returns NaN value for current architecture.)doc")
.def(
"sfpu_inf",
[](IDevice* device) { return tt::tt_metal::experimental::hal::get_inf(); },
R"doc(Returns Infinity value for current architecture.)doc");
.def(
"sfpu_eps",
[](IDevice* device) { return tt::tt_metal::experimental::hal::get_eps(); },
R"doc(Returns machine epsilon value for current architecture.)doc")
.def(
"sfpu_nan",
[](IDevice* device) { return tt::tt_metal::experimental::hal::get_nan(); },
R"doc(Returns NaN value for current architecture.)doc")
.def(
"sfpu_inf",
[](IDevice* device) { return tt::tt_metal::experimental::hal::get_inf(); },
R"doc(Returns Infinity value for current architecture.)doc");

auto pyDevice = static_cast<py::class_<tt::tt_metal::Device, IDevice, std::unique_ptr<tt::tt_metal::Device, py::nodelete>>>(m_device.attr("Device"));
pyDevice
Expand Down

0 comments on commit d8834f1

Please sign in to comment.