We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd0a40c commit dfd3da9Copy full SHA for dfd3da9
kernel_tuner/observers/register.py
@@ -1,16 +1,14 @@
1
from kernel_tuner.observers.observer import BenchmarkObserver
2
3
+
4
class RegisterObserver(BenchmarkObserver):
5
"""Observer for counting the number of registers."""
6
- def __init__(self) -> None:
7
- super().__init__()
8
-
9
def get_results(self):
10
try:
11
registers_per_thread = self.dev.num_regs
12
except AttributeError:
13
- raise NotImplementedError(f"Backend '{type(self.dev).__name__}' does not support count of registers per thread")
14
- return {
15
- "num_regs": registers_per_thread
16
- }
+ raise NotImplementedError(
+ f"Backend '{type(self.dev).__name__}' does not support count of registers per thread"
+ )
+ return {"num_regs": registers_per_thread}
0 commit comments