Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bindless Images][Exp] Add opaque file descriptor handle #703

Closed

Conversation

isaacault
Copy link
Contributor

Add ur_exp_file_descriptor_handle_t to support platform dependent file descriptors.

@@ -6600,6 +6600,10 @@ typedef struct ur_exp_interop_mem_handle_t_ *ur_exp_interop_mem_handle_t;
/// @brief Handle of interop semaphore
typedef struct ur_exp_interop_semaphore_handle_t_ *ur_exp_interop_semaphore_handle_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Handle of file descriptor
typedef struct ur_exp_file_descriptor_handle_t_ *ur_exp_file_descriptor_handle_t;

Choose a reason for hiding this comment

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

so by defining it as handle, each adapter is free to defining as it sees fit, correct?

Copy link

Choose a reason for hiding this comment

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

Is that the intent? A file handle doesn't really vary per adapter, it varies per host OS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alycm @jandres742 You're both correct.

Leaving the implementation to the adapter allows for flexibility on the implementation, although this would be a crude workaround and less than ideal to label it a handle as this implies a lot more overhead than we want for simple file descriptors.

#704 has been created to discuss and plan support for platform dependent types.

@isaacault
Copy link
Contributor Author

Closing in favour of #705

@isaacault isaacault closed this Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants