Skip to content

Commit 3180927

Browse files
authored
Fix 'occured' -> 'occurred' typos in backends and exir tracer (#18905)
Nine error messages used the misspelled `occured`: - `backends/apple/mps/runtime/MPSDevice.mm:141` — additionally had a duplicated `occured occured` (`An error occured occured while compiling library %d`). - `backends/cadence/hifi/operators/op_quantized_matmul_out.cpp` × 3 - `backends/cadence/hifi/operators/op_quantized_matmul_asym8uxasym8u_asym8u_out.cpp` × 3 - `backends/cadence/hifi/operators/op_quantized_matmul_asym8sxasym8s_asym8s_out.cpp` × 3 - `exir/tracer.py` — torchdynamo internal-error format string All `ET_CHECK_MSG` and printf-style messages reach end users in build / runtime error output, and the dynamo tracer message is logged on every dynamo trace failure. Python `ast.parse` clean for the touched tracer.py; .cpp/.mm changes are string-literal-only with no logic touched.
1 parent 225b5eb commit 3180927

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

backends/apple/mps/runtime/MPSDevice.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static inline MTLLanguageVersion getMetalLanguageVersion(const id<MTLDevice>& de
138138
ET_CHECK_OR_RETURN_ERROR(
139139
err == Error::Ok,
140140
Internal,
141-
"An error occured occured while compiling library %d", libraryType
141+
"An error occurred while compiling library %d", libraryType
142142
);
143143
}
144144
if (_m_pso_cache.find(kernelName) == _m_pso_cache.end()) {

backends/cadence/hifi/operators/op_quantized_matmul_asym8sxasym8s_asym8s_out.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void quantized_matmul_asym8sxasym8s_asym8s_out(
7979
static_cast<int32_t>(out_shift), // out_shift
8080
static_cast<int32_t>(out_zero_point)); // out_zero_bias
8181

82-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
82+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
8383
} else {
8484
/* Assuming matmul is 2D always */
8585
WORD32 num_inp_dims = 2;
@@ -103,7 +103,7 @@ void quantized_matmul_asym8sxasym8s_asym8s_out(
103103
num_out_dims,
104104
num_inp_dims);
105105

106-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
106+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
107107

108108
ret_val = xa_nn_matmul_asym8sxasym8s_asym8s(
109109
z, // p_out
@@ -123,7 +123,7 @@ void quantized_matmul_asym8sxasym8s_asym8s_out(
123123
static_cast<int32_t>(out_shift), // out_shift
124124
static_cast<int32_t>(out_zero_point)); // out_zero_bias
125125

126-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
126+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
127127
}
128128
}
129129
}

backends/cadence/hifi/operators/op_quantized_matmul_asym8uxasym8u_asym8u_out.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void quantized_matmul_asym8uxasym8u_asym8u_out(
7979
static_cast<int32_t>(out_shift), // out_shift
8080
static_cast<int32_t>(out_zero_point)); // out_zero_bias
8181

82-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
82+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
8383
} else {
8484
/* Assuming matmul is 2D always */
8585
WORD32 num_inp_dims = 2;
@@ -103,7 +103,7 @@ void quantized_matmul_asym8uxasym8u_asym8u_out(
103103
num_out_dims,
104104
num_inp_dims);
105105

106-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
106+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
107107

108108
ret_val = xa_nn_matmul_asym8uxasym8u_asym8u(
109109
z, // p_out
@@ -123,7 +123,7 @@ void quantized_matmul_asym8uxasym8u_asym8u_out(
123123
static_cast<int32_t>(out_shift), // out_shift
124124
static_cast<int32_t>(out_zero_point)); // out_zero_bias
125125

126-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
126+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
127127
}
128128
}
129129
}

backends/cadence/hifi/operators/op_quantized_matmul_out.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void inline _typed_quantized_matmul(
8484
static_cast<int32_t>(out_shift), // out_shift
8585
static_cast<int32_t>(out_zero_point)); // out_zero_bias
8686

87-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
87+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
8888
} else {
8989
WORD32 ret_val = xa_nn_matmul_asym8sxasym8s_asym8s(
9090
(int8_t*)z, // p_out
@@ -104,7 +104,7 @@ void inline _typed_quantized_matmul(
104104
static_cast<int32_t>(out_shift), // out_shift
105105
static_cast<int32_t>(out_zero_point)); // out_zero_bias
106106

107-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
107+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
108108
}
109109
} else {
110110
/* Assuming matmul is 2D always */
@@ -129,7 +129,7 @@ void inline _typed_quantized_matmul(
129129
num_out_dims,
130130
num_inp_dims);
131131

132-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
132+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
133133

134134
if (out.scalar_type() == exec_aten::ScalarType::Byte) {
135135
WORD32 ret_val = xa_nn_matmul_asym8uxasym8u_asym8u(
@@ -150,7 +150,7 @@ void inline _typed_quantized_matmul(
150150
static_cast<int32_t>(out_shift), // out_shift
151151
static_cast<int32_t>(out_zero_point)); // out_zero_bias
152152

153-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
153+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
154154
} else {
155155
WORD32 ret_val = xa_nn_matmul_asym8sxasym8s_asym8s(
156156
(int8_t*)z, // p_out
@@ -170,7 +170,7 @@ void inline _typed_quantized_matmul(
170170
static_cast<int32_t>(out_shift), // out_shift
171171
static_cast<int32_t>(out_zero_point)); // out_zero_bias
172172

173-
ET_CHECK_MSG(ret_val == 0, "An internal error occured");
173+
ET_CHECK_MSG(ret_val == 0, "An internal error occurred");
174174
}
175175
}
176176
}

exir/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def dynamo_trace(
700700
) from exc
701701
except Exception as exc:
702702
raise InternalError(
703-
"torchdynamo internal error occured. Please see above stacktrace"
703+
"torchdynamo internal error occurred. Please see above stacktrace"
704704
) from exc
705705

706706

0 commit comments

Comments
 (0)