File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
runtime/core/exec_aten/util Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 338338 *
339339 * @param[in] cond the condition to check
340340 */
341- #define ET_LOG_AND_RETURN_IF_FALSE (cond ) \
341+ #define ET_LOG_AND_RETURN_UNLESS (cond ) \
342342 do { \
343343 if (!(cond)) { \
344344 ET_LOG (Error, " Check failed (%s): " , #cond); \
345345 return false ; \
346346 } \
347347 } while (false )
348348
349+ /* *
350+ * DEPRECATED: please use ET_LOG_AND_RETURN_UNLESS instead.
351+ */
352+ #define ET_LOG_AND_RETURN_IF_FALSE ET_LOG_AND_RETURN_UNLESS
353+
349354/* *
350355 * A convenience macro to be used in utility functions that check whether input
351356 * tensor(s) are valid, which are expected to return a boolean. Checks whether
354359 * @param[in] cond the condition to check
355360 * @param[in] message an additional message to log with `cond`
356361 */
357- #define ET_LOG_MSG_AND_RETURN_IF_FALSE (cond, message, ...) \
362+ #define ET_LOG_MSG_AND_RETURN_UNLESS (cond, message, ...) \
358363 do { \
359364 if (!(cond)) { \
360365 ET_LOG (Error, " Check failed (%s): " message, #cond, ##__VA_ARGS__); \
361366 return false ; \
362367 } \
363368 } while (false )
364369
370+ /* *
371+ * DEPRECATED: please use ET_LOG_AND_RETURN_UNLESS instead.
372+ */
373+ #define ET_LOG_MSG_AND_RETURN_IF_FALSE ET_LOG_MSG_AND_RETURN_UNLESS
374+
365375/* *
366376 * If `cond` is false, log `cond` and return from the kernel with a failure
367377 * state set.
You can’t perform that action at this time.
0 commit comments