Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/CUDA2HIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const std::map <llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP {
{"caffe2/core/common_cudnn.h", {"caffe2/core/hip/common_miopen.h", "", CONV_INCLUDE, API_CAFFE2, 0}},
// RTC includes
{"nvrtc.h", {"hip/hiprtc.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_RTC, 0}},
{"cufile.h", {"hipfile.h", "", CONV_INCLUDE, API_FILE, 0}},
};

const std::map<llvm::StringRef, hipCounter> &CUDA_RENAMES_MAP() {
Expand Down Expand Up @@ -140,6 +141,8 @@ const std::map<llvm::StringRef, hipCounter> &CUDA_RENAMES_MAP() {
ret.insert(CUDA_SOLVER_FUNCTION_MAP.begin(), CUDA_SOLVER_FUNCTION_MAP.end());
ret.insert(CUDA_TENSOR_TYPE_NAME_MAP.begin(), CUDA_TENSOR_TYPE_NAME_MAP.end());
ret.insert(CUDA_TENSOR_FUNCTION_MAP.begin(), CUDA_TENSOR_FUNCTION_MAP.end());
ret.insert(CUDA_FILE_TYPE_NAME_MAP.begin(), CUDA_FILE_TYPE_NAME_MAP.end());
ret.insert(CUDA_FILE_FUNCTION_MAP.begin(), CUDA_FILE_FUNCTION_MAP.end());
return ret;
};

Expand Down Expand Up @@ -185,6 +188,8 @@ const std::map<llvm::StringRef, cudaAPIversions> &CUDA_VERSIONS_MAP() {
ret.insert(CUDA_SOLVER_FUNCTION_VER_MAP.begin(), CUDA_SOLVER_FUNCTION_VER_MAP.end());
ret.insert(CUDA_TENSOR_TYPE_NAME_VER_MAP.begin(), CUDA_TENSOR_TYPE_NAME_VER_MAP.end());
ret.insert(CUDA_TENSOR_FUNCTION_VER_MAP.begin(), CUDA_TENSOR_FUNCTION_VER_MAP.end());
ret.insert(CUDA_FILE_TYPE_NAME_VER_MAP.begin(), CUDA_FILE_TYPE_NAME_VER_MAP.end());
ret.insert(CUDA_FILE_FUNCTION_VER_MAP.begin(), CUDA_FILE_FUNCTION_VER_MAP.end());
return ret;
}

Expand Down Expand Up @@ -221,5 +226,7 @@ const std::map<llvm::StringRef, hipAPIversions> &HIP_VERSIONS_MAP() {
ret.insert(HIP_SOLVER_FUNCTION_VER_MAP.begin(), HIP_SOLVER_FUNCTION_VER_MAP.end());
ret.insert(HIP_TENSOR_TYPE_NAME_VER_MAP.begin(), HIP_TENSOR_TYPE_NAME_VER_MAP.end());
ret.insert(HIP_TENSOR_FUNCTION_VER_MAP.begin(), HIP_TENSOR_FUNCTION_VER_MAP.end());
ret.insert(HIP_FILE_TYPE_NAME_VER_MAP.begin(), HIP_FILE_TYPE_NAME_VER_MAP.end());
ret.insert(HIP_FILE_FUNCTION_VER_MAP.begin(), HIP_FILE_FUNCTION_VER_MAP.end());
return ret;
}
11 changes: 11 additions & 0 deletions src/CUDA2HIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ extern const std::map<llvm::StringRef, hipCounter> CUDA_SOLVER_FUNCTION_MAP;
extern const std::map<llvm::StringRef, hipCounter> CUDA_TENSOR_TYPE_NAME_MAP;
// Maps the names of CUDA TENSOR API functions to the corresponding HIP functions
extern const std::map<llvm::StringRef, hipCounter> CUDA_TENSOR_FUNCTION_MAP;
// Maps the names of cuFile API types to the corresponding HIP types
extern const std::map<llvm::StringRef, hipCounter> CUDA_FILE_TYPE_NAME_MAP;
// Maps the names of cuFile API functions to the corresponding HIP types
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment incorrectly states "to the corresponding HIP types" but this is the CUDA_FILE_FUNCTION_MAP which maps to HIP functions. The comment should read "Maps the names of cuFile API functions to the corresponding HIP functions" to be consistent with other function map comments in this file (e.g., lines 86-87, 90-91).

Suggested change
// Maps the names of cuFile API functions to the corresponding HIP types
// Maps the names of cuFile API functions to the corresponding HIP functions

Copilot uses AI. Check for mistakes.
extern const std::map<llvm::StringRef, hipCounter> CUDA_FILE_FUNCTION_MAP;

/**
* The union of all the above maps, except includes.
Expand Down Expand Up @@ -128,6 +132,8 @@ extern const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_TYPE_NAME_VE
extern const std::map<llvm::StringRef, cudaAPIversions> CUDA_SOLVER_FUNCTION_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIversions> CUDA_TENSOR_TYPE_NAME_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIversions> CUDA_TENSOR_FUNCTION_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIversions> CUDA_FILE_TYPE_NAME_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIversions> CUDA_FILE_FUNCTION_VER_MAP;

// The union of all the above maps.
const std::map<llvm::StringRef, cudaAPIversions> &CUDA_VERSIONS_MAP();
Expand Down Expand Up @@ -177,6 +183,10 @@ extern const std::map<llvm::StringRef, hipAPIversions> HIP_TENSOR_FUNCTION_VER_M
extern const std::map<llvm::StringRef, hipAPIChangedVersions> HIP_TENSOR_FUNCTION_CHANGED_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIChangedVersions> CUDA_TENSOR_FUNCTION_CHANGED_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIChangedVersions> CUDA_TENSOR_TYPE_CHANGED_VER_MAP;
extern const std::map<llvm::StringRef, hipAPIversions> HIP_FILE_TYPE_NAME_VER_MAP;
extern const std::map<llvm::StringRef, hipAPIversions> HIP_FILE_FUNCTION_VER_MAP;
extern const std::map<llvm::StringRef, hipAPIChangedVersions> HIP_FILE_FUNCTION_CHANGED_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIChangedVersions> CUDA_FILE_FUNCTION_CHANGED_VER_MAP;

// The union of all the above maps.
const std::map<llvm::StringRef, hipAPIversions> &HIP_VERSIONS_MAP();
Expand All @@ -194,6 +204,7 @@ extern const std::map<unsigned int, llvm::StringRef> CUDA_RTC_API_SECTION_MAP;
extern const std::map<unsigned int, llvm::StringRef> CUDA_CUB_API_SECTION_MAP;
extern const std::map<unsigned int, llvm::StringRef> CUDA_SOLVER_API_SECTION_MAP;
extern const std::map<unsigned int, llvm::StringRef> CUDA_TENSOR_API_SECTION_MAP;
extern const std::map<unsigned int, llvm::StringRef> CUDA_FILE_API_SECTION_MAP;

extern const std::map<llvm::StringRef, cudaAPIUnsupportedVersions> CUDA_DRIVER_FUNCTION_UNSUPPORTED_VER_MAP;
extern const std::map<llvm::StringRef, cudaAPIUnsupportedVersions> CUDA_RUNTIME_FUNCTION_UNSUPPORTED_VER_MAP;
Expand Down
41 changes: 40 additions & 1 deletion src/CUDA2HIP_Doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ namespace doc {
const string sROCSPARSE_csv = sROCSPARSE + csv_ext;
const string sCUSPARSE = "CUSPARSE";

/* hipFile */
const string sHIPFILE = "cuFile_API_supported_by_HIP";
const string sHIPFILE_md = sHIPFILE + md_ext;
const string sHIPFILE_csv = sHIPFILE + csv_ext;
const string sCUFILE = "cuFile";

const string sDEVICE = "CUDA_Device_API_supported_by_HIP";
const string sDEVICE_md = sDEVICE + md_ext;
const string sDEVICE_csv = sDEVICE + csv_ext;
Expand Down Expand Up @@ -860,7 +866,38 @@ namespace doc {
}
};

class DEVICE : public DOC {
class HIPFILE: public DOC {
public:
HIPFILE(const string &outDir): DOC(outDir) { hasROC = true; }
virtual ~HIPFILE() {}
protected:
const string sMetaKeywords = "hipFile, cuFile";
const string &getAdditionalMetaKeywords() const override { return sMetaKeywords; }

const sectionMap &getSections() const override { return CUDA_FILE_API_SECTION_MAP; }
const functionMap &getFunctions() const override { return CUDA_FILE_FUNCTION_MAP; }
const typeMap &getTypes() const override { return CUDA_FILE_TYPE_NAME_MAP; }
const versionMap &getFunctionVersions() const override { return CUDA_FILE_FUNCTION_VER_MAP; }
const hipVersionMap &getHipFunctionVersions() const override { return HIP_FILE_FUNCTION_VER_MAP; }
const hipChangedVersionMap &getHipChangedFunctionVersions() const override { return HIP_FILE_FUNCTION_CHANGED_VER_MAP; }
const cudaChangedVersionMap &getCudaChangedFunctionVersions() const override { return CUDA_FILE_FUNCTION_CHANGED_VER_MAP; }
const versionMap &getTypeVersions() const override { return CUDA_FILE_TYPE_NAME_VER_MAP; }
const hipVersionMap &getHipTypeVersions() const override { return HIP_FILE_TYPE_NAME_VER_MAP; }

const string &getName() const override { return sCUFILE; }
const string &getSecondAPI() const override { return sEmpty; }
const string &getJointAPI() const override { return sEmpty; }
const string &getFileName(docType format) const override {
switch (format) {
case none:
default: return sEmpty;
case md: return sHIPFILE_md;
case csv: return sHIPFILE_csv;
}
}
};

class DEVICE : public DOC {
public:
DEVICE(const string &outDir): DOC(outDir) {}
virtual ~DEVICE() {}
Expand Down Expand Up @@ -1028,6 +1065,8 @@ namespace doc {
docs.addDoc(&fft);
SPARSE sparse(sOut);
docs.addDoc(&sparse);
HIPFILE hipfile(sOut);
docs.addDoc(&hipfile);
DEVICE device(sOut);
docs.addDoc(&device);
RTC rtc(sOut);
Expand Down
175 changes: 175 additions & 0 deletions src/CUDA2HIP_FILE_API_functions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
#include "CUDA2HIP.h"
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is missing the standard copyright header that is present in all other similar source files in the codebase. Add an MIT license copyright header with "Copyright (c) 2025 - present Advanced Micro Devices, Inc. All rights reserved." at the beginning of the file, consistent with the pattern used in other API function files.

Copilot uses AI. Check for mistakes.

/* clang-format off */
const std::map<llvm::StringRef, hipCounter> CUDA_FILE_FUNCTION_MAP {
{"cufileop_status_error", {"hipFileOpStatusError", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileHandleRegister", {"hipFileHandleRegister", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileHandleDeregister", {"hipFileHandleDeregister", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBufRegister", {"hipFileBufRegister", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBufDeregister", {"hipFileBufDeregister", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileRead", {"hipFileRead", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileWrite", {"hipFileWrite", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverOpen", {"hipFileDriverOpen", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverClose", {"hipFileDriverClose", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverClose_v2", {"hipFileDriverClose", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileUseCount", {"hipFileUseCount", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverGetProperties", {"hipFileDriverGetProperties", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverSetPollMode", {"hipFileDriverSetPollMode", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverSetMaxDirectIOSize", {"hipFileDriverSetMaxDirectIOSize", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverSetMaxCacheSize", {"hipFileDriverSetMaxCacheSize", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileDriverSetMaxPinnedMemSize", {"hipFileDriverSetMaxPinnedMemSize", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileWriteAsync", {"hipFileWriteAsync", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileReadAsync", {"hipFileReadAsync", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileStreamRegister", {"hipFileStreamRegister", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileStreamDeregister", {"hipFileStreamDeregister", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBatchIOSetUp", {"hipFileBatchIOSetUp", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBatchIOSubmit", {"hipFileBatchIOSubmit", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBatchIOGetStatus", {"hipFileBatchIOGetStatus", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBatchIOCancel", {"hipFileBatchIOCancel", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileBatchIODestroy", {"hipFileBatchIODestroy", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileGetParameterSizeT", {"hipFileGetParameterSizeT", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileGetParameterBool", {"hipFileGetParameterBool", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileGetParameterString", {"hipFileGetParameterString", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileSetParameterSizeT", {"hipFileSetParameterSizeT", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileSetParameterBool", {"hipFileSetParameterBool", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
{"cuFileSetParameterString", {"hipFileSetParameterString", "", CONV_LIB_FUNC, API_FILE, 2, FULL}},
};
/* clang-format on */

const std::map<llvm::StringRef, hipAPIversions> HIP_FILE_FUNCTION_VER_MAP {
{"hipFileOpStatusError", {HIP_7000, HIP_0, HIP_0}},
{"hipFileHandleRegister", {HIP_7000, HIP_0, HIP_0}},
{"hipFileHandleDeregister", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBufRegister", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBufDeregister", {HIP_7000, HIP_0, HIP_0}},
{"hipFileRead", {HIP_7000, HIP_0, HIP_0}},
{"hipFileWrite", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverOpen", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverClose", {HIP_7000, HIP_0, HIP_0}},
{"hipFileUseCount", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverGetProperties", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverSetPollMode", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverSetMaxDirectIOSize", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverSetMaxCacheSize", {HIP_7000, HIP_0, HIP_0}},
{"hipFileDriverSetMaxPinnedMemSize", {HIP_7000, HIP_0, HIP_0}},
{"hipFileWriteAsync", {HIP_7000, HIP_0, HIP_0}},
{"hipFileReadAsync", {HIP_7000, HIP_0, HIP_0}},
{"hipFileStreamRegister", {HIP_7000, HIP_0, HIP_0}},
{"hipFileStreamDeregister", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBatchIOSetUp", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBatchIOSubmit", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBatchIOGetStatus", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBatchIOCancel", {HIP_7000, HIP_0, HIP_0}},
{"hipFileBatchIODestroy", {HIP_7000, HIP_0, HIP_0}},
{"hipFileGetParameterSizeT", {HIP_7000, HIP_0, HIP_0}},
{"hipFileGetParameterBool", {HIP_7000, HIP_0, HIP_0}},
{"hipFileGetParameterString", {HIP_7000, HIP_0, HIP_0}},
{"hipFileSetParameterSizeT", {HIP_7000, HIP_0, HIP_0}},
{"hipFileSetParameterBool", {HIP_7000, HIP_0, HIP_0}},
{"hipFileSetParameterString", {HIP_7000, HIP_0, HIP_0}},
};

const std::map<llvm::StringRef, cudaAPIversions> CUDA_FILE_FUNCTION_VER_MAP {
{"cufileop_status_error", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileHandleRegister", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileHandleDeregister", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBufRegister", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBufDeregister", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileRead", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileWrite", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverOpen", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverClose", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverClose_v2", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileUseCount", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverGetProperties", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverSetPollMode", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverSetMaxDirectIOSize", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverSetMaxCacheSize", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileDriverSetMaxPinnedMemSize", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileWriteAsync", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileReadAsync", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileStreamRegister", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileStreamDeregister", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBatchIOSetUp", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBatchIOSubmit", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBatchIOGetStatus", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBatchIOCancel", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileBatchIODestroy", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileGetParameterSizeT", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileGetParameterBool", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileGetParameterString", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileSetParameterSizeT", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileSetParameterBool", {CUDA_129, CUDA_0, CUDA_0}},
{"cuFileSetParameterString", {CUDA_129, CUDA_0, CUDA_0}},
};

const std::map<llvm::StringRef, cudaAPIChangedVersions> CUDA_FILE_FUNCTION_CHANGED_VER_MAP {
{"cufileop_status_error", {CUDA_0}},
{"cuFileHandleRegister", {CUDA_0}},
{"cuFileHandleDeregister", {CUDA_0}},
{"cuFileBufRegister", {CUDA_0}},
{"cuFileBufDeregister", {CUDA_0}},
{"cuFileRead", {CUDA_0}},
{"cuFileWrite", {CUDA_0}},
{"cuFileDriverOpen", {CUDA_0}},
{"cuFileDriverClose", {CUDA_0}},
{"cuFileDriverClose_v2", {CUDA_0}},
{"cuFileUseCount", {CUDA_0}},
{"cuFileDriverGetProperties", {CUDA_0}},
{"cuFileDriverSetPollMode", {CUDA_0}},
{"cuFileDriverSetMaxDirectIOSize", {CUDA_0}},
{"cuFileDriverSetMaxCacheSize", {CUDA_0}},
{"cuFileDriverSetMaxPinnedMemSize", {CUDA_0}},
{"cuFileWriteAsync", {CUDA_0}},
{"cuFileReadAsync", {CUDA_0}},
{"cuFileStreamRegister", {CUDA_0}},
{"cuFileStreamDeregister", {CUDA_0}},
{"cuFileBatchIOSetUp", {CUDA_0}},
{"cuFileBatchIOSubmit", {CUDA_0}},
{"cuFileBatchIOGetStatus", {CUDA_0}},
{"cuFileBatchIOCancel", {CUDA_0}},
{"cuFileBatchIODestroy", {CUDA_0}},
{"cuFileGetParameterSizeT", {CUDA_0}},
{"cuFileGetParameterBool", {CUDA_0}},
{"cuFileGetParameterString", {CUDA_0}},
{"cuFileSetParameterSizeT", {CUDA_0}},
{"cuFileSetParameterBool", {CUDA_0}},
{"cuFileSetParameterString", {CUDA_0}},
};

const std::map<llvm::StringRef, hipAPIChangedVersions> HIP_FILE_FUNCTION_CHANGED_VER_MAP {
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function 'hipFileOpStatusError' is missing from HIP_FILE_FUNCTION_CHANGED_VER_MAP. This function is present in CUDA_FILE_FUNCTION_MAP (line 5), HIP_FILE_FUNCTION_VER_MAP (line 40), and CUDA_FILE_FUNCTION_CHANGED_VER_MAP (line 107). Add an entry with HIP_7000 to maintain consistency across all version maps.

Suggested change
const std::map<llvm::StringRef, hipAPIChangedVersions> HIP_FILE_FUNCTION_CHANGED_VER_MAP {
const std::map<llvm::StringRef, hipAPIChangedVersions> HIP_FILE_FUNCTION_CHANGED_VER_MAP {
{"hipFileOpStatusError", {HIP_7000}},

Copilot uses AI. Check for mistakes.
{"hipFileHandleRegister", {HIP_7000}},
{"hipFileHandleDeregister", {HIP_7000}},
{"hipFileBufRegister", {HIP_7000}},
{"hipFileBufDeregister", {HIP_7000}},
{"hipFileRead", {HIP_7000}},
{"hipFileWrite", {HIP_7000}},
{"hipFileDriverOpen", {HIP_7000}},
{"hipFileDriverClose", {HIP_7000}},
{"hipFileUseCount", {HIP_7000}},
{"hipFileDriverGetProperties", {HIP_7000}},
{"hipFileDriverSetPollMode", {HIP_7000}},
{"hipFileDriverSetMaxDirectIOSize", {HIP_7000}},
{"hipFileDriverSetMaxCacheSize", {HIP_7000}},
{"hipFileDriverSetMaxPinnedMemSize", {HIP_7000}},
{"hipFileWriteAsync", {HIP_7000}},
{"hipFileReadAsync", {HIP_7000}},
{"hipFileStreamRegister", {HIP_7000}},
{"hipFileStreamDeregister", {HIP_7000}},
{"hipFileBatchIOSetUp", {HIP_7000}},
{"hipFileBatchIOSubmit", {HIP_7000}},
{"hipFileBatchIOGetStatus", {HIP_7000}},
{"hipFileBatchIOCancel", {HIP_7000}},
{"hipFileBatchIODestroy", {HIP_7000}},
{"hipFileGetParameterSizeT", {HIP_7000}},
{"hipFileGetParameterBool", {HIP_7000}},
{"hipFileGetParameterString", {HIP_7000}},
{"hipFileSetParameterSizeT", {HIP_7000}},
{"hipFileSetParameterBool", {HIP_7000}},
{"hipFileSetParameterString", {HIP_7000}},
};

const std::map<unsigned int, llvm::StringRef> CUDA_FILE_API_SECTION_MAP {
{1, "cuFile Types"},
{2, "cuFile Functions"},
};
Loading