@@ -2919,11 +2919,10 @@ static Tensor& linalg_eig_make_complex_eigenvectors(Tensor& complex_vectors, con
29192919DEFINE_DISPATCH (linalg_eig_stub);
29202920
29212921static std::tuple<Tensor&, Tensor&> linalg_eig_out_info (const Tensor& input, Tensor& values, Tensor& vectors, Tensor& infos, bool compute_eigenvectors) {
2922- TORCH_WARN (" input dtype: " , input.scalar_type ());
2923- TORCH_WARN (" input device" , input.device ());
29242922 auto options = input.options ();
29252923
29262924
2925+
29272926 // These internal asserts make explicit the assumptions in the implementation
29282927 // Error check with the actual error messages are done on the higher level of the hierarchy of calls
29292928 TORCH_INTERNAL_ASSERT_DEBUG_ONLY (input.dim () >= 2 );
@@ -3000,24 +2999,8 @@ static std::tuple<Tensor&, Tensor&> linalg_eig_out_info(const Tensor& input, Ten
30002999 // }
30013000
30023001 // call to the device-specific linalg_eig_stub (LAPACK, MAGMA or cuSOLVER)
3003- TORCH_WARN (" input device before linalg_eig_stub call: " , input.device ());
3004- TORCH_WARN (" input dtype before linalg_eig_stub call: " , input.scalar_type ());
3005-
3006- TORCH_WARN (" values device before linalg_eig_stub call: " , real_imag_values.device ());
3007- TORCH_WARN (" values dtype before linalg_eig_stub call: " , real_imag_values.scalar_type ());
3008-
3009- TORCH_WARN (" vectors device before linalg_eig_stub call: " , maybe_complex_vectors.device ());
3010- TORCH_WARN (" vectors dtype before linalg_eig_stub call: " , maybe_complex_vectors.scalar_type ());
3011-
3012- TORCH_WARN (" infos device before linalg_eig_stub call: " , infos.device ());
3013- TORCH_WARN (" infos dtype before linalg_eig_stub call: " , infos.scalar_type ());
3014-
3015- TORCH_WARN (" compute eigenvectors" , compute_eigenvectors);
3016-
30173002 linalg_eig_stub (input.device ().type (), real_imag_values, maybe_complex_vectors, infos, input, compute_eigenvectors);
30183003
3019- TORCH_WARN (" passed linalg_eig_stub" );
3020-
30213004 // if input is not complex we need to do some post-processing
30223005 if (!input.is_complex ()) {
30233006 // extract real and imaginary parts of the output
@@ -3062,13 +3045,6 @@ static std::tuple<Tensor&, Tensor&> linalg_eig_out_info(const Tensor& input, Ten
30623045 }
30633046 }
30643047
3065- auto n = input.size (-1 );
3066- TORCH_CHECK (values.is_complex (), " values (complex_values) not complex" );
3067- TORCH_CHECK (values.numel () >= n, " values tensor too small: " , values.numel (), " < " , n);
3068- TORCH_CHECK (values.is_contiguous (), " values tensor not contiguous" );
3069- TORCH_CHECK (real_imag_values.is_contiguous (), " real_imag_values not contiguous" );
3070-
3071-
30723048 return std::tuple<Tensor&, Tensor&>(values, vectors);
30733049}
30743050
@@ -3155,25 +3131,17 @@ std::tuple<Tensor&, Tensor&> linalg_eig_out(const Tensor& input, Tensor& values,
31553131}
31563132
31573133std::tuple<Tensor, Tensor> linalg_eig (const Tensor& input) {
3158- TORCH_WARN (" input dtype: " , input.scalar_type ());
31593134 ScalarType complex_dtype = toComplexType (input.scalar_type ());
31603135 Tensor values = at::empty ({0 }, input.options ().dtype (complex_dtype));
31613136 Tensor vectors = at::empty ({0 }, input.options ().dtype (complex_dtype));
31623137
3163- // TORCH_WARN("input shape: ", input.sizes());
3164- // TORCH_WARN("values shape: ", values.sizes());
3165- // TORCH_WARN("vectors shape: ", vectors.sizes());
3166-
31673138
31683139 at::linalg_eig_outf (input, values, vectors);
31693140
31703141 return std::tuple<Tensor, Tensor>(values, vectors);
31713142}
31723143
31733144Tensor& linalg_eigvals_out (const Tensor& input, Tensor& values) {
3174- TORCH_WARN (" entered linalg_eigvals_out" );
3175- TORCH_WARN (" input dtype: " , input.scalar_type ());
3176- TORCH_WARN (" input device: " , input.device ());
31773145 squareCheckInputs (input, " linalg.eigvals" );
31783146 TORCH_CHECK (input.isfinite ().all ().item <bool >(), " torch.linalg.eigvals: input tensor should not contain infs or NaNs." );
31793147
@@ -3228,11 +3196,9 @@ Tensor& linalg_eigvals_out(const Tensor& input, Tensor& values) {
32283196}
32293197
32303198Tensor linalg_eigvals (const Tensor& input) {
3231- TORCH_WARN (" entered linalg_eigvals" );
32323199 // if input requires grad we must compute the eigenvectors to make this function differentiable
32333200 // the eigenvectors are not exposed to the user
32343201 if (_may_require_fw_or_bw_grad (input)) {
3235- TORCH_WARN (" Gradient required, computing eigenvectors in linalg.eigvals" );
32363202 return std::get<0 >(at::linalg_eig (input));
32373203 }
32383204 return at::_linalg_eigvals (input);
0 commit comments