@@ -1470,7 +1470,7 @@ std::tuple<Tensor,Tensor> solve(const Tensor& self, const Tensor& A) {
1470
1470
" torch.solve is deprecated in favor of torch.linalg.solve" ,
1471
1471
" and will be removed in a future PyTorch release.\n " ,
1472
1472
" torch.linalg.solve has its arguments reversed and does not return the LU factorization.\n " ,
1473
- " To get the LU factorization see torch.linalg.lu_factor, which can be used with torch.lu_solve or torch.lu_unpack .\n " ,
1473
+ " To get the LU factorization see torch.linalg.lu_factor.\n " ,
1474
1474
" X = torch.solve(B, A).solution\n " ,
1475
1475
" should be replaced with\n " ,
1476
1476
" X = torch.linalg.solve(A, B)"
@@ -1489,7 +1489,7 @@ std::tuple<Tensor&,Tensor&> solve_out(const Tensor& self, const Tensor& A, Tenso
1489
1489
" torch.solve is deprecated in favor of torch.linalg.solve" ,
1490
1490
" and will be removed in a future PyTorch release.\n " ,
1491
1491
" torch.linalg.solve has its arguments reversed and does not return the LU factorization.\n " ,
1492
- " To get the LU factorization see torch.linalg.lu_factor, which can be used with torch.lu_solve or torch.lu_unpack .\n " ,
1492
+ " To get the LU factorization see torch.linalg.lu_factor.\n " ,
1493
1493
" X = torch.solve(B, A).solution\n " ,
1494
1494
" should be replaced with\n " ,
1495
1495
" X = torch.linalg.solve(A, B)"
@@ -2439,10 +2439,26 @@ TORCH_IMPL_FUNC(linalg_lu_solve_out)(const Tensor& LU,
2439
2439
}
2440
2440
2441
2441
Tensor lu_solve (const Tensor& self, const Tensor& LU_data, const Tensor& LU_pivots) {
2442
+ TORCH_WARN_ONCE (
2443
+ " torch.lu_solve is deprecated in favor of torch.linalg.lu_solve" ,
2444
+ " and will be removed in a future PyTorch release.\n " ,
2445
+ " Note that torch.linalg.lu_solve has its arguments reversed.\n " ,
2446
+ " X = torch.lu_solve(B, LU, pivots)\n " ,
2447
+ " should be replaced with\n " ,
2448
+ " X = torch.linalg.lu_solve(LU, pivots, B)"
2449
+ );
2442
2450
return at::linalg_lu_solve (LU_data, LU_pivots, self);
2443
2451
}
2444
2452
2445
2453
Tensor& lu_solve_out (const Tensor& self, const Tensor& LU_data, const Tensor& LU_pivots, Tensor& result) {
2454
+ TORCH_WARN_ONCE (
2455
+ " torch.lu_solve is deprecated in favor of torch.linalg.lu_solve" ,
2456
+ " and will be removed in a future PyTorch release.\n " ,
2457
+ " Note that torch.linalg.lu_solve has its arguments reversed.\n " ,
2458
+ " X = torch.lu_solve(B, LU, pivots)\n " ,
2459
+ " should be replaced with\n " ,
2460
+ " X = torch.linalg.lu_solve(LU, pivots, B)"
2461
+ );
2446
2462
return at::linalg_lu_solve_out (result, LU_data, LU_pivots, self);
2447
2463
}
2448
2464
0 commit comments