Add missing #include <array> to thread_name.cpp (#128664)

I got local compile errors (using clang 14.0.6) due to this missing include after pulling the
latest pytorch main.  It's totally puzzling why CI appears to pass
without this fix.  Hopefully someone else will have an idea if we are
missing some CI coverage or if I am using a strange build setup locally.

The PR introducing the compile errors was https://github.com/pytorch/pytorch/pull/128448.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/128664
Approved by: https://github.com/fduwjj, https://github.com/malfet, https://github.com/d4l3k
This commit is contained in:
Will Constable
2024-06-13 16:46:02 -07:00
committed by PyTorch MergeBot
parent 03725a0512
commit 0344f95c2e

View File

@ -1,6 +1,7 @@
#include <c10/util/thread_name.h>
#include <algorithm>
#include <array>
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(x, y) 0