๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import StableDiffusionPipeline | |
import torch_mlir | |
from shark.shark_importer import import_with_fx | |
import os | |
model_input = { | |
"clip": (torch.randint(1, 2, (1, 77)),), | |
"vae": (torch.randn(1, 4, 128, 128),), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
========== | |
VULKANINFO | |
========== | |
Vulkan Instance Version: 1.3.231 | |
Instance Extensions: count = 19 | |
=============================== | |
VK_EXT_acquire_xlib_display : extension revision 1 |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#composite_of_1731821440b = #util.composite<1731821440xi8, [ | |
dense_resource<__elided__> : tensor<320x1280xf16>, | |
dense_resource<__elided__> : tensor<1280x1280xf16>, | |
dense_resource<__elided__> : tensor<1280x320xf16>, | |
dense_resource<__elided__> : tensor<320x320xf16>, | |
dense_resource<__elided__> : tensor<320x320xf16>, | |
dense_resource<__elided__> : tensor<320x320xf16>, | |
dense_resource<__elided__> : tensor<320x320xf16>, | |
dense_resource<__elided__> : tensor<320x320xf16>, | |
dense_resource<__elided__> : tensor<320x320xf16>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import StableDiffusionPipeline | |
import torch_mlir | |
from shark.shark_importer import import_with_fx | |
import os | |
import torch.fx as fx | |
import sys | |
model_input = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph(): | |
%arg0_1 : [#users=1] = placeholder[target=arg0_1] | |
%arg1_1 : [#users=1] = placeholder[target=arg1_1] | |
%arg2_1 : [#users=32] = placeholder[target=arg2_1] | |
%expand : [#users=1] = call_function[target=torch.ops.aten.expand](args = (%arg1_1, [2]), kwargs = {}) | |
%arange : [#users=1] = call_function[target=torch.ops.aten.arange](args = (0, 160), kwargs = {dtype: torch.float32, device: cuda:0, pin_memory: False}) | |
%mul : [#users=1] = call_function[target=torch.ops.aten.mul](args = (%arange, -9.210340371976184), kwargs = {}) | |
%div : [#users=1] = call_function[target=torch.ops.aten.div](args = (%mul, 160), kwargs = {}) | |
%exp : [#users=1] = call_function[target=torch.ops.aten.exp](args = (%div,), kwargs = {}) | |
%slice_1 : [#users=1] = call_function[target=torch.ops.aten.slice](args = (%expand, 0, 0, 9223372036854775807), kwargs = {}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import StableDiffusionPipeline | |
import torch_mlir | |
from shark.shark_importer import import_with_fx | |
import os | |
import torch.fx as fx | |
import sys | |
model_input = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#loc = loc(unknown) | |
#map = affine_map<(d0) -> (d0)> | |
module attributes {torch.debug_module_name = "AtenComplexRealModule"} { | |
ml_program.global private mutable @global_seed(dense<0> : tensor<i64>) : tensor<i64> loc(#loc) | |
func.func @forward(%arg0: tensor<?xcomplex<f32>> loc(unknown)) -> tensor<?xf32> { | |
%c0 = arith.constant 0 : index loc(#loc) | |
%dim = tensor.dim %arg0, %c0 : tensor<?xcomplex<f32>> loc(#loc) | |
%0 = tensor.empty(%dim) : tensor<?xf32> loc(#loc) | |
%1 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel"]} ins(%arg0 : tensor<?xcomplex<f32>>) outs(%0 : tensor<?xf32>) { | |
^bb0(%in: complex<f32> loc(unknown), %out: f32 loc(unknown)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import shark | |
from shark.shark_importer import import_with_fx | |
from shark.shark_inference import SharkInference | |
from transformers import ( | |
AutoModelForCausalLM, | |
AutoTokenizer, | |
StoppingCriteria, | |
StoppingCriteriaList, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import shark | |
from shark.shark_importer import import_with_fx | |
from shark.shark_inference import SharkInference | |
from transformers import ( | |
AutoModelForCausalLM, | |
AutoTokenizer, | |
StoppingCriteria, | |
StoppingCriteriaList, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import StableDiffusionPipeline | |
import torch_mlir | |
from shark.shark_importer import import_with_fx | |
import os | |
import sys | |
from diffusers.models.attention_processor import AttnProcessor2_0 | |
from diffusers.models.attention_processor import AttnProcessor |