MCPcopy
hub / github.com/vladmandic/sdnext / test_solver

Function test_solver

modules/framepack/pipeline/uni_pc_fm.py:20–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def test_solver():
21 from modules import devices, shared
22 try:
23 a = torch.randn(50, 50).to(device=devices.device, dtype=torch.float32)
24 b = torch.randn(50, 2).to(device=devices.device, dtype=torch.float32)
25 _x = torch.linalg.solve(a, b)
26 return True
27 except Exception as e:
28 log.debug(f'FramePack: solver=cpu {e}')
29 return False
30
31
32def linalg_solve(A, B, device):

Callers 1

linalg_solveFunction · 0.85

Calls 2

toMethod · 0.45
solveMethod · 0.45

Tested by

no test coverage detected