Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for SD alt compilation/demo for T4 SM75 #786

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ def compile_clip(

pt_mod = pt_mod.eval()
params_ait = map_clip_params(pt_mod, batch_size, seqlen, depth)
batch_size = IntVar(values=list(batch_size), name="batch_size")
# batch higher dim should be 8+
# otherwise output image will be messy on T4 GPU (SM75)
batch_size_d = IntVar(values=[batch_size[0], max(8, batch_size[1])], name="batch_size")

input_ids_ait = Tensor(
[batch_size, seqlen], name="input0", dtype="int64", is_input=True
[batch_size_d, seqlen], name="input0", dtype="int64", is_input=True
)
position_ids_ait = Tensor(
[batch_size, seqlen], name="input1", dtype="int64", is_input=True
[batch_size_d, seqlen], name="input1", dtype="int64", is_input=True
)
Y = ait_mod(input_ids=input_ids_ait, position_ids=position_ids_ait)
mark_output(Y)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def compile_unet(
height_d = height
width_d = width
else:
batch_size = (batch_size[0], batch_size[1] * 2) # double batch size for unet
# double batch size for unet.
# Both lower and upper dims should be doubled, otherviwe output image will be messy on T4 GPU (SM75)
batch_size = (batch_size[0] * 2, batch_size[1] * 2)
batch_size = IntVar(values=list(batch_size), name="batch_size")
height = height[0] // 8, height[1] // 8
width = width[0] // 8, width[1] // 8
Expand Down