--- ./torch/csrc/jit/codegen/fuser/cpu/temp_file.h_orig	2025-01-13 03:10:24.444614179 -0600
+++ ./torch/csrc/jit/codegen/fuser/cpu/temp_file.h	2025-01-13 02:50:40.564821921 -0600
@@ -73,7 +73,11 @@
     // mkstemps edits its first argument in places
     // so we make a copy of the string here, including null terminator
     std::vector<char> tt(t.c_str(), t.c_str() + t.size() + 1);
+#ifdef _AIX
+    int fd = mkstemp(tt.data() + suffix);
+#else
     int fd = mkstemps(tt.data(), suffix);
+#endif
     AT_ASSERT(fd != -1);
     file_ = fdopen(fd, "r+");
     // - 1 because tt.size() includes the null terminator,
