Skip to content

Commit

Permalink
fix nvrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
FindDefinition committed Apr 26, 2023
1 parent 83cd3b1 commit 7d7b9b2
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 74 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## [0.4.9] - 2023-04-06
### Added
- add tv::TensorView capture support in nvrtc inliner
- add better error support for cumm nvrtc
### Fixed
- fix a bug in CummNVRTCModule, we need to keep flag order

## [0.4.8] - 2023-03-29
### Fixed
Expand Down
26 changes: 13 additions & 13 deletions cumm/apps/designer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from typing import Any, Callable, Coroutine, Dict, List, Optional, Union
import tensorpc

from tensorpc.apps.flow import flowapp
from tensorpc.flow import flowapp

from tensorpc.apps.flow.flowapp import mui, three
from tensorpc.flow import mui, three
import numpy as np
import inspect
from cumm import dtypes
Expand Down Expand Up @@ -128,9 +128,9 @@ def create_layout(self, num_warps, size: float):
btn = three.ToggleButton(f"W{i}", size, size,
partial(self.on_warp_select, index=i))
btn.mesh.set_pointer_callback(
on_over=three.EventCallback(partial(self.on_warp_over,
on_over=three.EventHandler(partial(self.on_warp_over,
index=i)),
on_out=three.EventCallback(partial(self.on_warp_out, index=i)))
on_out=three.EventHandler(partial(self.on_warp_out, index=i)))
btn.props.position = (x, y, 0)
layout[f"warp_{i}"] = btn
self.warps_btns.append(btn)
Expand All @@ -147,9 +147,9 @@ def create_layout(self, num_warps, size: float):
str(idx), size, size,
partial(self.on_lane_select, index=idx))

btn.mesh.set_pointer_callback(on_over=three.EventCallback(
btn.mesh.set_pointer_callback(on_over=three.EventHandler(
partial(self.on_lane_over, index=idx)),
on_out=three.EventCallback(
on_out=three.EventHandler(
partial(self.on_lane_out,
index=idx)))

Expand Down Expand Up @@ -195,7 +195,7 @@ async def reset(self, ev):
for v in self.warps_btns:
appev += v.mesh.update_event(toggled=False)
# await v.mesh.set_checked(False)
await self.send_app_event_and_wait(appev)
await self.send_and_wait(appev)
self.ee.emit(self.Reset)

async def reset_num_warps(self, num_warps: int):
Expand Down Expand Up @@ -921,14 +921,14 @@ async def set_mode(self, mode: DesignerTypeV2):
self.mode = mode
if mode == DesignerTypeV2.SmemWriterA:
if self.params.trans_a:
await self.send_app_event_and_wait(self.update_event(flex_direction="column"))
await self.send_and_wait(self.update_event(flex_direction="column"))
else:
await self.send_app_event_and_wait(self.update_event(flex_direction="row"))
await self.send_and_wait(self.update_event(flex_direction="row"))
if mode == DesignerTypeV2.SmemWriterB:
if self.params.trans_b:
await self.send_app_event_and_wait(self.update_event(flex_direction="row"))
await self.send_and_wait(self.update_event(flex_direction="row"))
else:
await self.send_app_event_and_wait(self.update_event(flex_direction="column"))
await self.send_and_wait(self.update_event(flex_direction="column"))

await self.set_new_layout({**self._get_layout_by_mode(mode)})

Expand Down Expand Up @@ -1162,11 +1162,11 @@ def __init__(self, desp: str, on_click: Callable[[], Coroutine]) -> None:
})

async def set_finish(self):
await self.send_app_event_and_wait(
await self.send_and_wait(
self.btn.update_event(name="Done", mui_color="success"))

async def set_working(self):
await self.send_app_event_and_wait(
await self.send_and_wait(
self.btn.update_event(name="Enter", mui_color="primary"))


Expand Down
Loading

0 comments on commit 7d7b9b2

Please sign in to comment.