Skip to content

Conversation

@derobins
Copy link

@derobins derobins commented Nov 13, 2025

AIROCFILE-7
AIROCFILE-15

Adds types and API calls from ROCm/hipFile:

  • hipfile/include/hipfile.h

@derobins derobins marked this pull request as draft November 13, 2025 21:00
{"CUFILE_ERRSTR", {CUDA_129, CUDA_0, CUDA_0}},
{"CUDA_DRV_ERR", {CUDA_129, CUDA_0, CUDA_0}},
{"IS_CUDA_ERR", {CUDA_129, CUDA_0, CUDA_0}},
};
Copy link
Author

Choose a reason for hiding this comment

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

We just used version placeholders, so this will probably need some fixing.

@emankov emankov added the feature Feature request or implementation label Nov 14, 2025
@emankov emankov changed the title Update HIPIFY to handle hipFile and rocFile [HIPIFY][FILE][feature] Initial support of cuFile to hipFile and rocFile hipification Nov 14, 2025
@emankov emankov changed the title [HIPIFY][FILE][feature] Initial support of cuFile to hipFile and rocFile hipification [HIPIFY][FILE][8.0][feature] Initial support of cuFile to hipFile and rocFile hipification Nov 14, 2025
@emankov emankov added HIP-8.0 Related to ROCm HIP 8.0 release FILE FILE-related partial Partial fix or implementation Linux Linux-related labels Nov 14, 2025
@emankov emankov changed the title [HIPIFY][FILE][8.0][feature] Initial support of cuFile to hipFile and rocFile hipification [HIPIFY][8.0][FILE][feature][Linux] Initial support of cuFile to hipFile and rocFile hipification Nov 14, 2025
Comment on lines 129 to 132
const string sHIPFILE = "cuFile_API_supported_by_HIP";
const string sHIPFILE_md = sHIPFILE + md_ext;
const string sHIPFILE_csv = sHIPFILE + csv_ext;
const string sHIPFILE_and_ROC_md = sHIPFILE + sandROC + md_ext;
const string sHIPFILE_and_ROC_csv = sHIPFILE + sandROC + csv_ext;
const string sROCFILE = "cuFile_API_supported_by_ROC";
const string sROCFILE_md = sROCFILE + md_ext;
const string sROCFILE_csv = sROCFILE + csv_ext;
const string sCUFILE = "cuFile";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const string sHIPFILE = "cuFile_API_supported_by_HIP";
const string sHIPFILE_md = sHIPFILE + md_ext;
const string sHIPFILE_csv = sHIPFILE + csv_ext;
const string sHIPFILE_and_ROC_md = sHIPFILE + sandROC + md_ext;
const string sHIPFILE_and_ROC_csv = sHIPFILE + sandROC + csv_ext;
const string sROCFILE = "cuFile_API_supported_by_ROC";
const string sROCFILE_md = sROCFILE + md_ext;
const string sROCFILE_csv = sROCFILE + csv_ext;
const string sCUFILE = "cuFile";
const string sHIPFILE = "cuFile_API_supported_by_HIP";

Could we keep same format as before?

Copy link
Author

Choose a reason for hiding this comment

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

How is the format different? I think I just copied one of the other libraries that has both hip and roc flavors (perhaps hipSolver/rocSover) because we have both hipFile and rocFile and would like to support both.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the request was to keep the existing formatting.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How is the format different? I think I just copied one of the other libraries that has both hip and roc flavors (perhaps hipSolver/rocSover) because we have both hipFile and rocFile and would like to support both.

Suggested change
const string sHIPFILE = "cuFile_API_supported_by_HIP";
const string sHIPFILE_md = sHIPFILE + md_ext;
const string sHIPFILE_csv = sHIPFILE + csv_ext;
const string sHIPFILE_and_ROC_md = sHIPFILE + sandROC + md_ext;
const string sHIPFILE_and_ROC_csv = sHIPFILE + sandROC + csv_ext;
const string sROCFILE = "cuFile_API_supported_by_ROC";
const string sROCFILE_md = sROCFILE + md_ext;
const string sROCFILE_csv = sROCFILE + csv_ext;
const string sCUFILE = "cuFile";
const string sHIPFILE = "cuFile_API_supported_by_HIP";

I meant to use existing format.

Copy link
Author

Choose a reason for hiding this comment

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

Is this all okay now?

@emankov
Copy link
Collaborator

emankov commented Nov 14, 2025

@derobins, could you please let us know the first CUDA version in which gds-nvidia-fs (with cuFile in it) appeared in the CUDA Toolkit Linux distribution?

@derobins
Copy link
Author

derobins commented Nov 14, 2025

@derobins, could you please let us know the first CUDA version in which gds-nvidia-fs (with cuFile in it) appeared in the CUDA Toolkit Linux distribution?

It looks like cuFile was released with CUDA 11.4.0. I don't see a cuFile section in the 11.3.x docs. It's confusing, though - 11.3 and 11.2 mention the library and header file in the list of things that are included, but there's no API documentation. Maybe the answer is 11.2?

https://docs.nvidia.com/cuda/archive/11.4.0/cufile-api/index.html

We'll have to grab header files from the various CUDA releases to see how the API has evolved and when new API calls were introduced.

@emankov
Copy link
Collaborator

emankov commented Nov 14, 2025

@derobins, I'll detect the former versions in the fs releases a bit later.

@derobins derobins force-pushed the hipFile branch 2 times, most recently from 84a81c0 to 5d5cd1d Compare November 27, 2025 08:28
@derobins derobins changed the title [HIPIFY][8.0][FILE][feature][Linux] Initial support of cuFile to hipFile and rocFile hipification [HIPIFY][8.0][FILE][feature][Linux] Initial support of cuFile to hipFile hipification Nov 27, 2025
};

const std::map<llvm::StringRef, hipAPIChangedVersions> HIP_FILE_FUNCTION_CHANGED_VER_MAP {
{"hipFileHandleRegister", {HIP_0}},
Copy link
Collaborator

Choose a reason for hiding this comment

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

{HIP_8000, HIP_0, HIP_0, HIP_8000}},,
or
{HIP_7000, HIP_0, HIP_0}},,
if hipFile were really shipped with HIP 7.0.0

Copy link
Author

@derobins derobins Nov 28, 2025

Choose a reason for hiding this comment

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

HIP_8000 is probably the right value, but the enum stops at HIP_7020 and I don't see any HIPIFY branches that look like they are prep for ROCm 8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature request or implementation FILE FILE-related HIP-8.0 Related to ROCm HIP 8.0 release Linux Linux-related partial Partial fix or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants