[2noise/ChatTTS]按#164处理完 pynini后,新的信息来了,windows 还是算了

2024-06-05 155 views
6

....................... ....................... raise RuntimeError( torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised: RuntimeError: Cannot find a working triton installation. More information on installing Triton can be found at https://github.com/openai/triton

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information

You can suppress this exception and fall back to eager by setting: import torch._dynamo torch._dynamo.config.suppress_errors = True

回答

7

import torch之后加入这个尝试 torch.compile = lambda *args, **kwargs: args[0]

2

安装 windows 编译的Triton ,google 搜索 triton-2.0.0-cp310-cp310-win_amd64.whl

1

import torch之后加入这个尝试 torch.compile = lambda *args, **kwargs: args[0]

赞一个,这个可以

5

import torch之后加入这个尝试 torch.compile = lambda *args, **kwargs: args[0]

感谢,这个有用 大模型回答: 这意味着当你调用 torch.compile(model, *args, *kwargs) 时,不论你传入了多少个位置参数(args)和关键字参数(**kwargs),这个函数都将直接返回第一个位置参数 args[0],即你传入的模型对象本身。这样的重定义通常用于临时禁用或模拟一个函数的行为,比如在调试、测试或某些特定优化场景下。

例如,假设你有一个模型 model 并且通常你会使用 torch.compile(model) 来应用某种形式的编译或优化。但是,如果你使用了上述lambda表达式重写了 torch.compile,那么调用 torch.compile(model) 实际上不会做任何优化,而是直接返回 model,这可能用于绕过某些问题或进行对比实验。

请注意,这只是一个示例,并非 torch 库实际的或推荐的用法。在实际使用PyTorch时,torch.compile 在PyTorch 1.12及以后的版本中被引入,用于启用或配置 Ahead-of-Time (AOT) 编译特性,与上述示例中的自定义行为完全不同。上述代码仅为展示lambda函数如何被用来临时改变或理解函数行为的概念。