# Naming Consistency: Util vs Utils

**URL:** <https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434>\
**Category:** RFC\
**Created:** [April 20, 2020, 4:25pm UTC](https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434 "2020-04-20T16:25:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tqchen](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tqchen/32/5_2.png) [@tqchen](https://discuss.tvm.apache.org/u/tqchen)\
**Post date:** [April 20, 2020, 4:25pm UTC](https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434/1 "2020-04-20T16:25:51Z")

</div>

There has been quite a few places where the name util/utils has been used to indicate common utility functions. From a design perspective, the name “util” should be avoided when possible. Instead we should think about whether we can have an explicit module name or add a more informative prefix.

This discussion, however, is about naming consistency of files. Right now there are files named by as util or utils. It might be helpful to pick a consistent naming convention through out the code base.

Here are some current potential rationales for the names:

- util simply means the utility module(if we choose to view it as a module)
- utils do not necessarily serve as a independent module, it means a collection of utilities.

Please share your thoughts

_Poll ([view on site](https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434/1))_

---

<div class="post-metadata">

**Author:** ![junrushao](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/junrushao/32/205_2.png) [@junrushao](https://discuss.tvm.apache.org/u/junrushao)\
**Post date:** [April 20, 2020, 5:17pm UTC](https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434/2 "2020-04-20T17:17:07Z")

</div>

> the name “util” should be avoided when possible. Instead we should think about whether we can have an explicit module name or add a more informative prefix.

Strongly agree. If a utils.h file is under directory xxx, we should name it at least as xxx\_utils.h, or other more informative prefix.

I would say using util is enough, adding an extra s doesn’t seem to change anything…

---

<div class="post-metadata">

**Author:** ![tqchen](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tqchen/32/5_2.png) [@tqchen](https://discuss.tvm.apache.org/u/tqchen)\
**Post date:** [April 21, 2020, 8:45pm UTC](https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434/3 "2020-04-21T20:45:27Z")

</div>

will leave the thread open for another two days

---

<div class="post-metadata">

**Author:** ![tqchen](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tqchen/32/5_2.png) [@tqchen](https://discuss.tvm.apache.org/u/tqchen)\
**Post date:** [May 1, 2020, 10:24pm UTC](https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434/4 "2020-05-01T22:24:58Z")

</div>

Thanks for everyone who shared their thoughts, we will proceed to pick utils as the canonical name.
