From 57ad953d7bc1b0dbdf92950982cf54e3e42ac1f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Gergely?= Date: Wed, 19 Apr 2023 05:49:28 +0200 Subject: [PATCH 1/3] Doxysphinx docs (#3192) * Reorganize documenation based on rocm-docs-core * Move build, install and contributing guides to docs * Bump readthedocs config to Ubuntu 20.04 * Add more direct links to the API modules * Pin rocm-docs-core version, add dependabot - Use the pip package to have rocm-docs-core pinned - Add dependabot config to update pinned packages (including rocm-docs-core) * fixup! Add more direct links to the API modules --------- [ROCm/hip commit: ae5f8714f4c1c1c3350bd510b283c4f954e3b645] --- projects/hip/.github/dependabot.yml | 12 + projects/hip/.readthedocs.yaml | 21 + .../doxy.cfg => .doxygen/Doxyfile} | 106 +- projects/hip/docs/.doxygen/mainpage.md | 33 + projects/hip/docs/.gitignore | 5 + projects/hip/docs/.sphinx/_toc.yml.in | 24 + projects/hip/docs/.sphinx/requirements.in | 1 + projects/hip/docs/.sphinx/requirements.txt | 290 +++++ projects/hip/docs/conf.py | 26 + .../hip_build.md => developer_guide/build.md} | 133 +- .../developer_guide/contributing.md} | 33 +- .../logging.md} | 90 +- .../hip/docs/{markdown => }/device_md_gen.py | 0 projects/hip/docs/doxygen-input/mainpage.txt | 19 - projects/hip/docs/doxygen-input/sync.txt | 49 - .../{markdown => }/gen_clang_option_doc.sh | 0 .../debugging.md} | 29 +- .../how_to_guides/install.md} | 17 +- projects/hip/docs/index.md | 37 + ...A_Driver_API_functions_supported_by_HIP.md | 1 - ..._Runtime_API_functions_supported_by_HIP.md | 1121 ----------------- projects/hip/docs/markdown/clang_options.md | 763 ----------- projects/hip/docs/markdown/clang_options.txt | 758 ----------- .../cuComplex_API_supported_by_HIP.md | 37 - projects/hip/docs/markdown/hip_bugs.md | 172 --- .../docs/markdown/hip_porting_driver_api.md | 287 ----- .../hip/docs/markdown/hip_porting_guide.md | 597 --------- .../hip/docs/markdown/modern_cpp_features.md | 468 ------- projects/hip/docs/markdown/obj_tooling.md | 92 -- .../deprecated_api_list.md} | 2 +- .../hip_terms2.md => reference/glossary.md} | 0 .../kernel_language.md} | 94 +- .../hip-math-api.md => reference/math_api.md} | 0 .../hip_terms.md => reference/terms.md} | 0 .../hip_faq.md => user_guide/faq.md} | 109 +- .../docs/{markdown => user_guide}/hip_rtc.md | 0 .../programming_manual.md} | 4 +- 37 files changed, 704 insertions(+), 4726 deletions(-) create mode 100644 projects/hip/.github/dependabot.yml create mode 100644 projects/hip/.readthedocs.yaml rename projects/hip/docs/{doxygen-input/doxy.cfg => .doxygen/Doxyfile} (98%) create mode 100644 projects/hip/docs/.doxygen/mainpage.md create mode 100644 projects/hip/docs/.gitignore create mode 100644 projects/hip/docs/.sphinx/_toc.yml.in create mode 100644 projects/hip/docs/.sphinx/requirements.in create mode 100644 projects/hip/docs/.sphinx/requirements.txt create mode 100644 projects/hip/docs/conf.py rename projects/hip/docs/{markdown/hip_build.md => developer_guide/build.md} (64%) rename projects/hip/{CONTRIBUTING.md => docs/developer_guide/contributing.md} (85%) rename projects/hip/docs/{markdown/hip_logging.md => developer_guide/logging.md} (76%) rename projects/hip/docs/{markdown => }/device_md_gen.py (100%) delete mode 100644 projects/hip/docs/doxygen-input/mainpage.txt delete mode 100644 projects/hip/docs/doxygen-input/sync.txt rename projects/hip/docs/{markdown => }/gen_clang_option_doc.sh (100%) rename projects/hip/docs/{markdown/hip_debugging.md => how_to_guides/debugging.md} (95%) rename projects/hip/{INSTALL.md => docs/how_to_guides/install.md} (83%) create mode 100644 projects/hip/docs/index.md delete mode 100644 projects/hip/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md delete mode 100644 projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md delete mode 100644 projects/hip/docs/markdown/clang_options.md delete mode 100644 projects/hip/docs/markdown/clang_options.txt delete mode 100644 projects/hip/docs/markdown/cuComplex_API_supported_by_HIP.md delete mode 100644 projects/hip/docs/markdown/hip_bugs.md delete mode 100644 projects/hip/docs/markdown/hip_porting_driver_api.md delete mode 100644 projects/hip/docs/markdown/hip_porting_guide.md delete mode 100644 projects/hip/docs/markdown/modern_cpp_features.md delete mode 100644 projects/hip/docs/markdown/obj_tooling.md rename projects/hip/docs/{markdown/hip_deprecated_api_list.md => reference/deprecated_api_list.md} (98%) rename projects/hip/docs/{markdown/hip_terms2.md => reference/glossary.md} (100%) rename projects/hip/docs/{markdown/hip_kernel_language.md => reference/kernel_language.md} (94%) rename projects/hip/docs/{markdown/hip-math-api.md => reference/math_api.md} (100%) rename projects/hip/docs/{markdown/hip_terms.md => reference/terms.md} (100%) rename projects/hip/docs/{markdown/hip_faq.md => user_guide/faq.md} (76%) rename projects/hip/docs/{markdown => user_guide}/hip_rtc.md (100%) rename projects/hip/docs/{markdown/hip_programming_guide.md => user_guide/programming_manual.md} (99%) diff --git a/projects/hip/.github/dependabot.yml b/projects/hip/.github/dependabot.yml new file mode 100644 index 0000000000..9cdf2d670c --- /dev/null +++ b/projects/hip/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/docs/.sphinx" # Location of package manifests + open-pull-requests-limit: 10 + schedule: + interval: "daily" diff --git a/projects/hip/.readthedocs.yaml b/projects/hip/.readthedocs.yaml new file mode 100644 index 0000000000..1240c9c525 --- /dev/null +++ b/projects/hip/.readthedocs.yaml @@ -0,0 +1,21 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +sphinx: + configuration: docs/conf.py + +formats: [htmlzip] + +python: + install: + - requirements: docs/.sphinx/requirements.txt + +build: + os: ubuntu-20.04 + tools: + python: "3.8" + apt_packages: + - "doxygen" + - "graphviz" # For dot graphs in doxygen diff --git a/projects/hip/docs/doxygen-input/doxy.cfg b/projects/hip/docs/.doxygen/Doxyfile similarity index 98% rename from projects/hip/docs/doxygen-input/doxy.cfg rename to projects/hip/docs/.doxygen/Doxyfile index 16c2c900b6..7f89f635ed 100644 --- a/projects/hip/docs/doxygen-input/doxy.cfg +++ b/projects/hip/docs/.doxygen/Doxyfile @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "HIP: Heterogenous-computing Interface for Portability" +PROJECT_NAME = "HIP Runtime API Reference" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = RuntimeAPI +OUTPUT_DIRECTORY = docBin # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -275,7 +275,7 @@ TCL_SUBST = # members will be omitted, etc. # The default value is: NO. -OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored @@ -360,7 +360,7 @@ AUTOLINK_SUPPORT = YES # diagrams that involve STL classes more complete and accurate. # The default value is: NO. -BUILTIN_STL_SUPPORT = NO +BUILTIN_STL_SUPPORT = # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. @@ -392,7 +392,7 @@ IDL_PROPERTY_SUPPORT = YES # all members of a group must be documented explicitly. # The default value is: NO. -DISTRIBUTE_GROUP_DOC = NO +DISTRIBUTE_GROUP_DOC = YES # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option @@ -440,7 +440,7 @@ INLINE_SIMPLE_STRUCTS = NO # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. -TYPEDEF_HIDES_STRUCT = NO +TYPEDEF_HIDES_STRUCT = YES # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be @@ -467,7 +467,7 @@ LOOKUP_CACHE_SIZE = 0 # normally produced when WARNINGS is set to YES. # The default value is: NO. -EXTRACT_ALL = NO +EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. @@ -553,7 +553,7 @@ HIDE_IN_BODY_DOCS = NO # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. -INTERNAL_DOCS = YES +INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also @@ -562,7 +562,7 @@ INTERNAL_DOCS = YES # (including Cygwin) ands Mac users are advised to set this option to NO. # The default value is: system dependent. -CASE_SENSE_NAMES = YES +CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the @@ -673,14 +673,14 @@ GENERATE_TESTLIST = YES # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. -GENERATE_BUGLIST = NO +GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. -GENERATE_DEPRECATEDLIST= NO +GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond @@ -829,15 +829,8 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = $(HIP_PATH)/docs/doxygen-input/mainpage.txt \ - $(HIP_PATH)/README.md \ - $(HIP_PATH)/CONTRIBUTING.md \ - $(HIP_PATH)/docs/doxygen-input/sync.txt \ - $(HIP_PATH)/INSTALL.md \ - $(HIP_PATH)/docs/markdown \ - $(HIP_PATH)/include/hip \ - $(HIP_PATH)/include/hip/amd_detail/ \ - $(HIP_PATH)/src/ +INPUT = mainpage.md \ + ../../include/hip # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -868,18 +861,47 @@ FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ *.h \ + *.hh \ + *.hxx \ *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ *.md \ + *.mm \ *.dox \ - *.doc \ - *.txt \ + *.py \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.as \ + *.js # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. -RECURSIVE = YES +RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a @@ -921,7 +943,7 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = ./examples +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -941,7 +963,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = $(HIP_PATH)/docs/doxygen-input/images +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -1182,7 +1204,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = ../_doxygen/header.html # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1192,7 +1214,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = ../_doxygen/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1204,7 +1226,7 @@ HTML_FOOTER = # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = ../_doxygen/stylesheet.css # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets @@ -1217,7 +1239,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = ../_doxygen/extra_stylesheet.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1266,7 +1288,7 @@ HTML_COLORSTYLE_GAMMA = 80 # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_TIMESTAMP = YES +HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that @@ -1524,7 +1546,7 @@ GENERATE_TREEVIEW = NO # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. -ENUM_VALUES_PER_LINE = 4 +ENUM_VALUES_PER_LINE = 1 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. @@ -1575,7 +1597,7 @@ FORMULA_MACROFILE = # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -USE_MATHJAX = NO +USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: @@ -1598,7 +1620,7 @@ MATHJAX_FORMAT = HTML-CSS # The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example @@ -1634,7 +1656,7 @@ MATHJAX_CODEFILE = # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. -SEARCHENGINE = YES +SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using JavaScript. There @@ -2010,7 +2032,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of @@ -2130,7 +2152,7 @@ ENABLE_PREPROCESSING = YES # The default value is: NO. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -MACRO_EXPANSION = NO +MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then # the macro expansion is limited to the macros specified with the PREDEFINED and @@ -2138,14 +2160,14 @@ MACRO_EXPANSION = NO # The default value is: NO. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_ONLY_PREDEF = NO +EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -SEARCH_INCLUDES = YES +SEARCH_INCLUDES = NO # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by the @@ -2214,7 +2236,7 @@ TAGFILES = # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = docBin/html/tagfile.xml # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2248,7 +2270,7 @@ EXTERNAL_PAGES = YES # powerful graphs. # The default value is: YES. -CLASS_DIAGRAMS = YES +CLASS_DIAGRAMS = NO # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The @@ -2432,7 +2454,7 @@ DIRECTORY_GRAPH = YES # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_IMAGE_FORMAT = png +DOT_IMAGE_FORMAT = svg # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. @@ -2444,7 +2466,7 @@ DOT_IMAGE_FORMAT = png # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -INTERACTIVE_SVG = NO +INTERACTIVE_SVG = YES # The DOT_PATH tag can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. diff --git a/projects/hip/docs/.doxygen/mainpage.md b/projects/hip/docs/.doxygen/mainpage.md new file mode 100644 index 0000000000..44e41c67d0 --- /dev/null +++ b/projects/hip/docs/.doxygen/mainpage.md @@ -0,0 +1,33 @@ +# HIP Runtime API Reference {#mainpage} + +This is the full HIP Runtime API reference. The API is organized into +[modules](modules.html) based on functionality. + +## List of Modules +- @ref GlobalDefs +- @ref Driver +- @ref Device +- @ref Execution +- @ref Error +- @ref Stream +- @ref StreamM +- @ref Memory + - @ref External + - @ref MemoryM + - @ref StreamO +- @ref PeerToPeer +- @ref Context + - @ref ContextD +- @ref Module +- @ref Occupancy +- @ref Profiler +- @ref Clang +- @ref Texture + - @ref TextureD + - @ref TextureU +- @ref Runtime +- @ref Callback +- @ref Graph +- @ref Virtual +- @ref GL +- [Surface Object](#Surface) diff --git a/projects/hip/docs/.gitignore b/projects/hip/docs/.gitignore new file mode 100644 index 0000000000..8f68c925a3 --- /dev/null +++ b/projects/hip/docs/.gitignore @@ -0,0 +1,5 @@ +/_build +/_doxygen +/_images +/_static +/_templates \ No newline at end of file diff --git a/projects/hip/docs/.sphinx/_toc.yml.in b/projects/hip/docs/.sphinx/_toc.yml.in new file mode 100644 index 0000000000..d44d7e721e --- /dev/null +++ b/projects/hip/docs/.sphinx/_toc.yml.in @@ -0,0 +1,24 @@ +root: index +subtrees: +- caption: User Guide + entries: + - file: user_guide/programming_manual + - file: user_guide/hip_rtc + - file: user_guide/faq +- caption: How to Guides + entries: + - file: how_to_guides/install.md + - file: how_to_guides/debugging.md +- caption: Reference + entries: + - file: .doxygen/docBin/html/index + - file: reference/kernel_language + - file: reference/math_api + - file: reference/terms + - file: reference/glossary + - file: reference/deprecated_api_list +- caption: Developer Guide + entries: + - file: developer_guide/build + - file: developer_guide/logging + - file: developer_guide/contributing.md \ No newline at end of file diff --git a/projects/hip/docs/.sphinx/requirements.in b/projects/hip/docs/.sphinx/requirements.in new file mode 100644 index 0000000000..2e15625db8 --- /dev/null +++ b/projects/hip/docs/.sphinx/requirements.in @@ -0,0 +1 @@ +rocm-docs-core[api_reference] \ No newline at end of file diff --git a/projects/hip/docs/.sphinx/requirements.txt b/projects/hip/docs/.sphinx/requirements.txt new file mode 100644 index 0000000000..6f21017824 --- /dev/null +++ b/projects/hip/docs/.sphinx/requirements.txt @@ -0,0 +1,290 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile requirements.in +# +accessible-pygments==0.0.3 + # via pydata-sphinx-theme +alabaster==0.7.12 + # via sphinx +asttokens==2.2.0 + # via stack-data +attrs==22.1.0 + # via + # jsonschema + # jupyter-cache +babel==2.10.3 + # via + # pydata-sphinx-theme + # sphinx +backcall==0.2.0 + # via ipython +beautifulsoup4==4.11.1 + # via pydata-sphinx-theme +breathe==4.34.0 + # via rocm-docs-core +certifi==2022.6.15 + # via requests +cffi==1.15.1 + # via pynacl +charset-normalizer==2.1.0 + # via requests +click==8.1.3 + # via + # click-log + # doxysphinx + # jupyter-cache + # sphinx-external-toc +click-log==0.4.0 + # via doxysphinx +debugpy==1.6.4 + # via ipykernel +decorator==5.1.1 + # via ipython +deprecated==1.2.13 + # via pygithub +docutils==0.16 + # via + # breathe + # myst-parser + # pydata-sphinx-theme + # rocm-docs-core + # sphinx +doxysphinx==3.2.1 + # via rocm-docs-core +entrypoints==0.4 + # via jupyter-client +executing==1.2.0 + # via stack-data +fastjsonschema==2.16.2 + # via nbformat +gitdb==4.0.10 + # via gitpython +gitpython==3.1.31 + # via rocm-docs-core +greenlet==2.0.1 + # via sqlalchemy +idna==3.3 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==5.1.0 + # via + # jupyter-cache + # myst-nb +importlib-resources==5.10.4 + # via + # jsonschema + # rocm-docs-core +ipykernel==6.17.1 + # via myst-nb +ipython==8.7.0 + # via + # ipykernel + # myst-nb +jedi==0.18.2 + # via ipython +jinja2==3.1.2 + # via + # myst-parser + # sphinx +json5==0.9.11 + # via doxysphinx +jsonschema==4.17.3 + # via nbformat +jupyter-cache==0.5.0 + # via myst-nb +jupyter-client==7.4.7 + # via + # ipykernel + # nbclient +jupyter-core==5.1.0 + # via + # jupyter-client + # nbformat +linkify-it-py==1.0.3 + # via myst-parser +lxml==4.9.2 + # via doxysphinx +markdown-it-py==2.1.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.1 + # via jinja2 +matplotlib-inline==0.1.6 + # via + # ipykernel + # ipython +mdit-py-plugins==0.3.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +myst-nb==0.17.1 + # via rocm-docs-core +myst-parser[linkify]==0.18.1 + # via + # myst-nb + # rocm-docs-core +nbclient==0.5.13 + # via + # jupyter-cache + # myst-nb +nbformat==5.7.0 + # via + # jupyter-cache + # myst-nb + # nbclient +nest-asyncio==1.5.6 + # via + # ipykernel + # jupyter-client + # nbclient +packaging==21.3 + # via + # ipykernel + # pydata-sphinx-theme + # sphinx +parso==0.8.3 + # via jedi +pexpect==4.8.0 + # via ipython +pickleshare==0.7.5 + # via ipython +pkgutil-resolve-name==1.3.10 + # via jsonschema +platformdirs==2.5.4 + # via jupyter-core +prompt-toolkit==3.0.33 + # via ipython +psutil==5.9.4 + # via ipykernel +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pycparser==2.21 + # via cffi +pydata-sphinx-theme==0.13.1 + # via sphinx-book-theme +pygithub==1.57 + # via rocm-docs-core +pygments==2.12.0 + # via + # accessible-pygments + # ipython + # pydata-sphinx-theme + # sphinx +pyjwt==2.6.0 + # via pygithub +pynacl==1.5.0 + # via pygithub +pyparsing==3.0.9 + # via + # doxysphinx + # packaging +pyrsistent==0.19.2 + # via jsonschema +python-dateutil==2.8.2 + # via jupyter-client +pytz==2022.1 + # via babel +pyyaml==6.0 + # via + # jupyter-cache + # myst-nb + # myst-parser + # sphinx-external-toc +pyzmq==24.0.1 + # via + # ipykernel + # jupyter-client +requests==2.28.1 + # via + # pygithub + # sphinx +rocm-docs-core[api_reference]==0.2.0 + # via -r requirements.in +six==1.16.0 + # via + # asttokens + # python-dateutil +smmap==5.0.0 + # via gitdb +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.3.2.post1 + # via beautifulsoup4 +sphinx==4.3.1 + # via + # breathe + # myst-nb + # myst-parser + # pydata-sphinx-theme + # rocm-docs-core + # sphinx-book-theme + # sphinx-copybutton + # sphinx-design + # sphinx-external-toc + # sphinx-notfound-page +sphinx-book-theme==1.0.0rc2 + # via rocm-docs-core +sphinx-copybutton==0.5.1 + # via rocm-docs-core +sphinx-design==0.3.0 + # via rocm-docs-core +sphinx-external-toc==0.3.1 + # via rocm-docs-core +sphinx-notfound-page==0.8.3 + # via rocm-docs-core +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +sqlalchemy==1.4.44 + # via jupyter-cache +stack-data==0.6.2 + # via ipython +tabulate==0.9.0 + # via jupyter-cache +tornado==6.2 + # via + # ipykernel + # jupyter-client +traitlets==5.6.0 + # via + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbformat +typing-extensions==4.4.0 + # via + # myst-nb + # myst-parser +uc-micro-py==1.0.1 + # via linkify-it-py +urllib3==1.26.11 + # via requests +wcwidth==0.2.5 + # via prompt-toolkit +wrapt==1.15.0 + # via deprecated +zipp==3.11.0 + # via + # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/projects/hip/docs/conf.py b/projects/hip/docs/conf.py new file mode 100644 index 0000000000..62b6736eba --- /dev/null +++ b/projects/hip/docs/conf.py @@ -0,0 +1,26 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +from rocm_docs import ROCmDocs +from typing import Any, Dict, List + +docs_core = ROCmDocs("HIP Documentation") +docs_core.run_doxygen() +docs_core.enable_api_reference() +docs_core.setup() + +for sphinx_var in ROCmDocs.SPHINX_VARS: + globals()[sphinx_var] = getattr(docs_core, sphinx_var) + +# rocm-docs-core might or might not have changed these yet (depending on version), +# and we don't want to wipe their settings if they did +if not "html_theme_options" in globals(): + html_theme_options: Dict[str, Any] = {} +if not "exclude_patterns" in globals(): + exclude_patterns: List[str] = [] + +html_theme_options["show_navbar_depth"] = 2 +exclude_patterns.append(".doxygen/mainpage.md") diff --git a/projects/hip/docs/markdown/hip_build.md b/projects/hip/docs/developer_guide/build.md similarity index 64% rename from projects/hip/docs/markdown/hip_build.md rename to projects/hip/docs/developer_guide/build.md index 5fc7daa9b3..51117be207 100755 --- a/projects/hip/docs/markdown/hip_build.md +++ b/projects/hip/docs/developer_guide/build.md @@ -1,73 +1,56 @@ -## Table of Contents +# Building HIP from Source - - -- [Prerequisites](#Prerequisites) -- [Build HIP on AMD platform](#build-hip-on-amd-platform) - * [Get HIP source code](#get-hip-source-code) - * [Set the environment variables](#set-the-environment-variables) - * [Build HIP](#build-hip) - * [Default paths and environment variables](#default-paths-and-environment-variables) - * [Build HIP Tests](#build-hip-tests) -- [Build HIP on NVIDIA platform](#build-hip-on-NVIDIA-platform) - * [Get HIP source code](#get-hip-source-code) - * [Set the environment variables](#set-the-environment-variables) - * [Build HIP](#build-hip) - * [Build HIP tests](#build-hip-tests) -- [Run HIP](#run-hip) - - -# Prerequisites +## Prerequisites HIP code can be developed either on AMD ROCm platform using HIP-Clang compiler, or a CUDA platform with nvcc installed. Before build and run HIP, make sure drivers and pre-build packages are installed properly on the platform. -## AMD platform +### AMD platform Install ROCm packages (see ROCm Installation Guide on AMD public documentation site (https://docs.amd.com/)) or install pre-built binary packages using the package manager, -``` +```shell sudo apt install mesa-common-dev sudo apt install clang sudo apt install comgr sudo apt-get -y install rocm-dkms ``` -## NVIDIA platform +### NVIDIA platform Install Nvidia driver and pre-build packages (see HIP Installation Guide at https://docs.amd.com/ for the release) -## Branch of repository +### Branch of repository -Before get HIP source code, set the expected branch of repository at the variable ROCM_BRANCH. +Before get HIP source code, set the expected branch of repository at the variable `ROCM_BRANCH`. For example, for ROCm5.0 release branch, set -``` +```shell export ROCM_BRANCH=rocm-5.0.x ``` ROCm5.4 release branch, set -``` +```shell export ROCM_BRANCH=rocm-5.4.x ``` Similiar format for future branches. -ROCM_PATH is path where ROCM is installed. BY default ROCM_PATH is at /opt/rocm. +`ROCM_PATH` is path where ROCM is installed. BY default `ROCM_PATH` is at `/opt/rocm`. -# Build HIP on AMD platform +## Build HIP on AMD platform -## Get HIP source code +### Get HIP source code -``` +```shell git clone -b "$ROCM_BRANCH" https://github.com/ROCm-Developer-Tools/hipamd.git git clone -b "$ROCM_BRANCH" https://github.com/ROCm-Developer-Tools/hip.git git clone -b "$ROCM_BRANCH" https://github.com/ROCm-Developer-Tools/ROCclr.git git clone -b "$ROCM_BRANCH" https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git ``` -## Set the environment variables +### Set the environment variables -``` +```shell export HIPAMD_DIR="$(readlink -f hipamd)" export HIP_DIR="$(readlink -f hip)" ``` @@ -78,31 +61,32 @@ See https://github.com/ROCm-Developer-Tools/ROCclr HIPAMD repository provides implementation specifically for AMD platform. See https://github.com/ROCm-Developer-Tools/hipamd -## Build HIP +### Build HIP -``` +```shell cd "$HIPAMD_DIR" mkdir -p build; cd build cmake -DHIP_COMMON_DIR=$HIP_DIR -DCMAKE_PREFIX_PATH="/" -DCMAKE_INSTALL_PREFIX=$PWD/install .. make -j$(nproc) sudo make install ``` - -Note: If you don't specify CMAKE_INSTALL_PREFIX, hip runtime will be installed to "/hip". +::::{note} +If you don't specify `CMAKE_INSTALL_PREFIX`, hip runtime will be installed to `/hip`. By default, release version of AMDHIP is built. +:::: -## Default paths and environment variables +### Default paths and environment variables - * By default HIP looks for HSA in /hsa (can be overridden by setting HSA_PATH environment variable). - * By default HIP is installed into /hip (can be overridden by setting HIP_PATH environment variable). - * By default HIP looks for clang in /llvm/bin (can be overridden by setting HIP_CLANG_PATH environment variable) - * By default HIP looks for device library in /lib (can be overridden by setting DEVICE_LIB_PATH environment variable). - * Optionally, consider adding /bin to your PATH to make it easier to use the tools. - * Optionally, set HIPCC_VERBOSE=7 to output the command line for compilation. + * By default HIP looks for HSA in `/hsa` (can be overridden by setting `HSA_PATH` environment variable). + * By default HIP is installed into `/hip` (can be overridden by setting HIP_PATH environment variable). + * By default HIP looks for clang in `/llvm/bin` (can be overridden by setting `HIP_CLANG_PATH` environment variable) + * By default HIP looks for device library in `/lib` (can be overridden by setting `DEVICE_LIB_PATH` environment variable). + * Optionally, consider adding `/bin` to your `PATH` to make it easier to use the tools. + * Optionally, set `HIPCC_VERBOSE=7` to output the command line for compilation. -After make install command, make sure HIP_PATH is pointed to $PWD/install/hip. +After make install command, make sure `HIP_PATH` is pointed to `$PWD/install/hip`. -## Generating profiling header after adding/changing a HIP API +### Generating profiling header after adding/changing a HIP API When you add or change a HIP API, you might need to generate a new `hip_prof_str.h` header. This header is used by rocm tools to track HIP APIs like rocprofiler/roctracer etc. To generate the header after your change, use the tool `hip_prof_gen.py` present in `hipamd/src`. @@ -120,34 +104,39 @@ Flags: * -e - on error exit mode * -p - HIP_INIT_API macro patching mode -Example Usage: `hip_prof_gen.py -v -p -t --priv /include/hip/hip_runtime_api.h /src /include/hip/amd_detail/hip_prof_str.h /include/hip/amd_detail/hip_prof_str.h.new` +Example Usage: +```shell +hip_prof_gen.py -v -p -t --priv /include/hip/hip_runtime_api.h \ +/src /include/hip/amd_detail/hip_prof_str.h \ +/include/hip/amd_detail/hip_prof_str.h.new +``` -## Build HIP tests +### Build HIP tests -### Build HIP directed tests +#### Build HIP directed tests Developers can build HIP directed tests right after build HIP commands, -``` +```shell sudo make install make -j$(nproc) build_tests ``` -By default, all HIP directed tests will be built and generated under the folder $HIPAMD_DIR/build/directed_tests. +By default, all HIP directed tests will be built and generated under the folder `$HIPAMD_DIR/build/`directed_tests. Take HIP directed device APIs tests, as an example, all available test applications will have executable files generated under, -$HIPAMD_DIR/build/directed_tests/runtimeApi/device. +`$HIPAMD_DIR/build/directed_tests/runtimeApi/device`. Run all HIP directed_tests, use the command, -``` +```shell ctest ``` Or -``` +```shell make test ``` Build and run a single directed test, use the follow command as an example, -``` +```shell make directed_tests.texture.hipTexObjPitch cd $HIPAMD_DIR/build/directed_tests/texcture ./hipTexObjPitch @@ -155,18 +144,18 @@ cd $HIPAMD_DIR/build/directed_tests/texcture Please note, the integrated HIP directed tests, will be deprecated in future release. -### Build HIP catch tests +##### Build HIP catch tests HIP catch tests, with new architectured Catch2, are official seperated from HIP project, exist in HIP tests repository, can be built via the following instructions. -#### Get HIP tests source code +##### Get HIP tests source code -``` +```shell git clone -b "$ROCM_BRANCH" https://github.com/ROCm-Developer-Tools/hip-tests.git ``` -#### Build HIP tests from source +##### Build HIP tests from source -``` +```shell export HIP_TESTS_DIR="$(readlink -f hip-tests)" cd "$HIP_TESTS_DIR" mkdir -p build; cd build @@ -179,16 +168,16 @@ HIP catch tests are built under the folder $HIP_TESTS_DIR/build. To run any single catch test, the following is an example, -``` +```shell cd $HIP_TESTS_DIR/build/catch_tests/unit/texture ./TextureTest ``` -#### Build HIP Catch2 standalone test +##### Build HIP Catch2 standalone test HIP Catch2 supports build a standalone test, for example, -``` +```shell cd "$HIP_TESTS_DIR" hipcc $HIP_TESTS_DIR/catch/unit/memory/hipPointerGetAttributes.cc -I ./catch/include ./catch/hipTestMain/standalone_main.cc -I ./catch/external/Catch2 -o hipPointerGetAttributes ./hipPointerGetAttributes @@ -197,26 +186,26 @@ hipcc $HIP_TESTS_DIR/catch/unit/memory/hipPointerGetAttributes.cc -I ./catch/inc All tests passed ``` -# Build HIP on NVIDIA platform +## Build HIP on NVIDIA platform -## Get HIP source code +### Get HIP source code -``` +```shell git clone -b "$ROCM_BRANCH" https://github.com/ROCm-Developer-Tools/hip.git git clone -b "$ROCM_BRANCH" https://github.com/ROCm-Developer-Tools/hipamd.git ``` -## Set the environment variables +### Set the environment variables -``` +```shell export HIP_DIR="$(readlink -f hip)" export HIPAMD_DIR="$(readlink -f hipamd)" ``` -## Build HIP +### Build HIP -``` +```shell cd "$HIPAMD_DIR" mkdir -p build; cd build cmake -DHIP_COMMON_DIR=$HIP_DIR -DHIP_PLATFORM=nvidia -DCMAKE_INSTALL_PREFIX=$PWD/install .. @@ -224,10 +213,10 @@ make -j$(nproc) sudo make install ``` -## Build HIP tests -Build HIP tests commands on NVIDIA platform are basically the same as AMD, except set -DHIP_PLATFORM=nvidia. +### Build HIP tests +Build HIP tests commands on NVIDIA platform are basically the same as AMD, except set `-DHIP_PLATFORM=nvidia`. -# Run HIP +## Run HIP Compile and run the [square sample](https://github.com/ROCm-Developer-Tools/HIP/tree/rocm-5.0.x/samples/0_Intro/square). diff --git a/projects/hip/CONTRIBUTING.md b/projects/hip/docs/developer_guide/contributing.md similarity index 85% rename from projects/hip/CONTRIBUTING.md rename to projects/hip/docs/developer_guide/contributing.md index e5fd36e9d4..1d9288fbb1 100644 --- a/projects/hip/CONTRIBUTING.md +++ b/projects/hip/docs/developer_guide/contributing.md @@ -1,12 +1,12 @@ # Contributor Guidelines ## Make Tips -ROCM_PATH is path where ROCM is installed. BY default ROCM_PATH is /opt/rocm. -When building HIP, you will likely want to build and install to a local user-accessible directory (rather than ). -This can be easily be done by setting the -DCMAKE_INSTALL_PREFIX variable when running cmake. Typical use case is to -set CMAKE_INSTALL_PREFIX to your HIP git root, and then ensure HIP_PATH points to this directory. For example +`ROCM_PATH` is path where ROCM is installed. BY default `ROCM_PATH` is `/opt/rocm`. +When building HIP, you will likely want to build and install to a local user-accessible directory (rather than ``). +This can be easily be done by setting the `-DCMAKE_INSTALL_PREFIX` variable when running cmake. Typical use case is to +set `CMAKE_INSTALL_PREFIX` to your HIP git root, and then ensure `HIP_PATH` points to this directory. For example -``` +```shell cmake .. -DCMAKE_INSTALL_PREFIX=.. make install @@ -18,20 +18,19 @@ After making HIP, don't forget the "make install" step ! ## Adding a new HIP API - - - Add a translation to the hipify-clang tool ; many examples abound. - - For stat tracking purposes, place the API into an appropriate stat category ("dev", "mem", "stream", etc). - - Add a inlined NVIDIA implementation for the function in include/hip/nvidia_detail/hip_runtime_api.h. - - These are typically headers - - Add an HIP_ROCclr definition and Doxygen comments for the function in include/amd_detail/hip_runtime_api.h - - Source implementation typically go in hip/rocclr/hip_*.cpp. The implementation involve calls to HIP runtime (ie for hipStream_t). +- Add a translation to the hipify-clang tool ; many examples abound. + - For stat tracking purposes, place the API into an appropriate stat category ("dev", "mem", "stream", etc). +- Add a inlined NVIDIA implementation for the function in include/hip/nvidia_detail/hip_runtime_api.h. + - These are typically headers +- Add an HIP_ROCclr definition and Doxygen comments for the function in include/amd_detail/hip_runtime_api.h + - Source implementation typically go in hip/rocclr/hip_*.cpp. The implementation involve calls to HIP runtime (ie for hipStream_t). ## Check HIP-Clang version In some cases new HIP-Clang features are tied to specified releases, and it can be useful to check the current version is sufficiently new enough to support the desired feature. HIP runtime version -``` +```console > cat /hip/bin/.hipVersion # Auto-generated by cmake HIP_VERSION_MAJOR=3 @@ -41,7 +40,7 @@ HIP_VERSION_PATCH=20345-519ef3f2 HIP-Clang compiler version -``` +```console $ /llvm/bin/clang -v clang version 11.0.0 (/src/external/llvm-project/clang 075fedd3fd2f4d9d8cca79d0cd51f64c5ef21432) Target: x86_64-unknown-linux-gnu @@ -128,9 +127,9 @@ Differences or limitations of HIP APIs as compared to CUDA APIs should be clearl Before checking in or submitting a pull request, run all directed tests (see tests/README.md) and all Rodinia tests. Ensure pass results match starting point: -```shell - > cd examples/ - > ./run_all.sh +```console +> cd examples/ +> ./run_all.sh ``` diff --git a/projects/hip/docs/markdown/hip_logging.md b/projects/hip/docs/developer_guide/logging.md similarity index 76% rename from projects/hip/docs/markdown/hip_logging.md rename to projects/hip/docs/developer_guide/logging.md index 94858167f2..b712a40d7c 100644 --- a/projects/hip/docs/markdown/hip_logging.md +++ b/projects/hip/docs/developer_guide/logging.md @@ -1,32 +1,37 @@ -## What is HIP logging for? ### +# Logging Mechanisms -HIP provides a logging mechanism, which is a convinient way of printing important information so as to trace HIP API and runtime codes during the execution of HIP application. -It assists HIP development team in the development of HIP runtime, and is useful for HIP application developers as well. -Depending on the setting of logging level and logging mask, HIP logging will print different kinds of information, for different types of functionalities such as HIP APIs, executed kernels, queue commands and queue contents, etc. +HIP provides a logging mechanism, which is a convenient way of printing +important information so as to trace HIP API and runtime codes during the +execution of HIP application. +It assists HIP development team in the development of HIP runtime, and is useful +for HIP application developers as well. +Depending on the setting of logging level and logging mask, HIP logging will +print different kinds of information, for different types of functionalities +such as HIP APIs, executed kernels, queue commands and queue contents, etc. ## HIP Logging Level: -By Default, HIP logging is disabled, it can be enabled via environment setting, - - AMD_LOG_LEVEL +By default, HIP logging is disabled, it can be enabled via the `AMD_LOG_LEVEL` +environment variable. +The value controls the logging level. The levels are defined as: -The value of the setting controls different logging level, - -``` +```cpp enum LogLevel { -LOG_NONE = 0, -LOG_ERROR = 1, -LOG_WARNING = 2, -LOG_INFO = 3, -LOG_DEBUG = 4 + LOG_NONE = 0, + LOG_ERROR = 1, + LOG_WARNING = 2, + LOG_INFO = 3, + LOG_DEBUG = 4 }; ``` ## HIP Logging Mask: -Logging mask is designed to print types of functionalities during the execution of HIP application. +Logging mask is designed to print types of functionalities during the execution +of HIP application. It can be set as one of the following values, -``` +```cpp enum LogMask { LOG_API = 0x00000001, //!< API call LOG_CMD = 0x00000002, //!< Kernel and Copy Commands and Barriers @@ -49,39 +54,41 @@ enum LogMask { }; ``` -Once AMD_LOG_LEVEL is set, logging mask is set as default with the value 0x7FFFFFFF. -However, for different pupose of logging functionalities, logging mask can be defined as well via environment variable, - - - AMD_LOG_MASK +Once `AMD_LOG_LEVEL` is set, logging mask is set as default with the value +`0x7FFFFFFF`. +However, for different purpose of logging functionalities, logging mask can be +defined as well via environment variable `AMD_LOG_MASK` ## HIP Logging command: To pring HIP logging information, the function is defined as -``` -#define ClPrint(level, mask, format, ...) - do { - if (AMD_LOG_LEVEL >= level) { - if (AMD_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { - if (AMD_LOG_MASK & amd::LOG_LOCATION) { - amd::log_printf(level, __FILENAME__, __LINE__, format, ##__VA_ARGS__); - } else { - amd::log_printf(level, "", 0, format, ##__VA_ARGS__); - } - } - } +```cpp +#define ClPrint(level, mask, format, ...) \ + do { \ + if (AMD_LOG_LEVEL >= level) { \ + if (AMD_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \ + if (AMD_LOG_MASK & amd::LOG_LOCATION) { \ + amd::log_printf(level, __FILENAME__, __LINE__, format, ##__VA_ARGS__);\ + } else { \ + amd::log_printf(level, "", 0, format, ##__VA_ARGS__); \ + } \ + } \ + } \ } while (false) ``` -So in HIP code, call ClPrint() function with proper input varibles as needed, for example, -``` +So in HIP code, call `ClPrint()` function with proper input varibles as needed, +for example, +```cpp ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Initializing HSA stack."); ``` ## HIP Logging Example: -Below is an example to enable HIP logging and get logging information during execution of hipinfo, +Below is an example to enable HIP logging and get logging information during +execution of hipinfo, -``` +```console user@user-test:~/hip/bin$ export AMD_LOG_LEVEL=4 user@user-test:~/hip/bin$ ./hipinfo @@ -174,14 +181,13 @@ memInfo.free: 7.98 GB (100%) ## HIP Logging Tips: - HIP logging works for both release and debug version of HIP application. - -- Logging function with different logging level can be called in the code as needed. - +- Logging function with different logging level can be called in the code as + needed. - Information with logging level less than AMD_LOG_LEVEL will be printed. +- If need to save the HIP logging output information in a file, just define the + file at the command when run the application at the terminal, for example, -- If need to save the HIP logging output information in a file, just define the file at the command when run the application at the terminal, for example, - -``` +```console user@user-test:~/hip/bin$ ./hipinfo > ~/hip_log.txt ``` diff --git a/projects/hip/docs/markdown/device_md_gen.py b/projects/hip/docs/device_md_gen.py similarity index 100% rename from projects/hip/docs/markdown/device_md_gen.py rename to projects/hip/docs/device_md_gen.py diff --git a/projects/hip/docs/doxygen-input/mainpage.txt b/projects/hip/docs/doxygen-input/mainpage.txt deleted file mode 100644 index b1e6119a63..0000000000 --- a/projects/hip/docs/doxygen-input/mainpage.txt +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file mainpage.cpp - * @brief : DoxyGen Main Page. - * @mainpage Heterogeneous-computing Interface for Portability (HIP) - * @tableofcontents - * - * The HIP interface makes it very easy to port existing CUDA apps to run on AMD GPUs, - * or to develop new apps that can run on either CUDA or AMD GPUs from a common source base. - * - * - HIP is very thin and has little or no performance impact over coding directly in CUDA NVCC mode. - * - HIP allows developers to use the "best" development environment and tools on each target platform. - * - HIP allows coding in a single-source C++ programming language including features such as templates, C++11 lambdas,and more. - * - HIPIFY tools automatically convert CUDA sources to HIP. - * - Developers can specialize for CUDA or HIP to tune for performance or handle tricky cases with #ifdef. - - * - See the @ref API. - - -*/ diff --git a/projects/hip/docs/doxygen-input/sync.txt b/projects/hip/docs/doxygen-input/sync.txt deleted file mode 100644 index 4341418358..0000000000 --- a/projects/hip/docs/doxygen-input/sync.txt +++ /dev/null @@ -1,49 +0,0 @@ -/** @page Synchonization - * @tableofcontents - - * # Host-synchronous behavior: - The following commands are "host-asynchronous" - meaning they do not wait for any preceding commands to complete, and may return control to the host thread before the requested operation completes: - - - Kernel launches (hipLaunchKernel() ) - - Asynchronous memory copies - any memory copy API which contains "Async", such as hipMemcpyAsync()) - - Any memory set (for example, hipMemset()); - - TODO - - "Host-synchronous" commands have the following properties: - - wait for all previous commands to complete. - - will not return control back to host until the command completes. - - - The following commands are "host-synchronous". - - - hipMemcpy waits for preceding work in the same stream to complete. - - - * # Stream synchronization - - -### Blocking - -The term "blocking" has two meanings in HIP. - -The first refers to synchronization commands (ie hipStreamSynchronize, hipEventSynchronize) that cause the host CPU to wait for GPU activity to complete. -These can either use an active where the host CPU spin-waits on the synchronization variable, or can use an interrupt-based scheme where the core is interrupted -when the wait completes. The second technique is referred to as "blocking" (ie hipDeviceBlockingSync, hipEventBlockingSync) while the first is referred -to as "active". Active can be appropriate for short tasks where latency is critical, but comes at the expense of a CPU core dedicated to monitoring the event. - - ### HIP_LAUNCH_BLOCKING (also can use CUDA_LAUNCH_BLOCKING) - - - The following commands become host-synchronous and will not return until the requested command has completed: - - - Kernel launches (hipKernelLaunch). - - Memory set commands (hipMemset, hipMemsetAsync). - - Memory copy commands (hipMemcpy, hipMemsetAsync). - - Note CUDA_LAUNCH_BLOCKING does add any pre-serialization to the commands and does not affect the concurrent stream behavior. For example, - even when CUDA_LAUNCH_BLOCKING is set, kernels or data copy commands launched to separate streams can execute concurrently. Use the NULL - stream if additional stream synchronization is desired. - - - - -*/ diff --git a/projects/hip/docs/markdown/gen_clang_option_doc.sh b/projects/hip/docs/gen_clang_option_doc.sh similarity index 100% rename from projects/hip/docs/markdown/gen_clang_option_doc.sh rename to projects/hip/docs/gen_clang_option_doc.sh diff --git a/projects/hip/docs/markdown/hip_debugging.md b/projects/hip/docs/how_to_guides/debugging.md similarity index 95% rename from projects/hip/docs/markdown/hip_debugging.md rename to projects/hip/docs/how_to_guides/debugging.md index c6e857a90f..556a51c106 100644 --- a/projects/hip/docs/markdown/hip_debugging.md +++ b/projects/hip/docs/how_to_guides/debugging.md @@ -1,21 +1,6 @@ # HIP Debugging There are some techniques provided in HIP for developers to trace and debug codes during execution, this section describes some details and practical suggestions on debugging. -Table of Contents -================= - - * [ Debugging Tools](#debugging-tools) - * [Using ltrace](#using-ltrace) - * [Using ROCgdb](#using-rocgdb) - * [Other Debugging Tools](#Other-debugging-tools) - * [ Debugging HIP Application](#debugging-hip-application) - * [ Useful Environment Variables](#useful-environment-variables) - * [Kernel Enqueue Serialization](#kernel-enqueue-serialization) - * [Making Device visible](#making-device-visible) - * [Dump code object](#dump-code-object) - * [HSA related environment variables](#HSA-related-environment-variables) - * [ General Debugging Tips](#general-debugging-tips) - ## Debugging tools ### Using ltrace @@ -27,7 +12,7 @@ The trace can also show performance issues related to accidental calls to expens Here's a simple sample with command-line to trace hip APIs and output: -``` +```console $ ltrace -C -e "hip*" ./hipGetChanDesc hipGetChanDesc->hipCreateChannelDesc(0x7ffdc4b66860, 32, 0, 0) = 0x7ffdc4b66860 hipGetChanDesc->hipMallocArray(0x7ffdc4b66840, 0x7ffdc4b66860, 8, 8) = 0 @@ -39,7 +24,7 @@ PASSED! Another sample below with command-line only trace hsa APIs and output: -``` +```console $ ltrace -C -e "hsa*" ./hipGetChanDesc libamdhip64.so.4->hsa_init(0, 0x7fff325a69d0, 0x9c80e0, 0 libhsa-runtime64.so.1->hsaKmtOpenKFD(0x7fff325a6590, 0x9c38c0, 0, 1) = 0 @@ -98,7 +83,7 @@ For details, see (https://github.com/ROCm-Developer-Tools/ROCgdb). Below is a sample how to use ROCgdb run and debug HIP application, rocgdb is installed with ROCM package in the folder /opt/rocm/bin. -``` +```console $ export PATH=$PATH:/opt/rocm/bin $ rocgdb ./hipTexObjPitch GNU gdb (rocm-dkms-no-npi-hipclang-6549) 10.1 @@ -133,7 +118,7 @@ There are also other debugging tools available online developers can google and Below is an example to show how to get useful information from the debugger while running a simple memory copy test, which caused an issue of segmentation fault. -``` +```console test: simpleTest2 numElements=4194304 sizeElements=4194304 bytes Segmentation fault (core dumped) @@ -219,12 +204,12 @@ For system with multiple devices, it's possible to make only certain device(s) v HIP_VISIBLE_DEVICES, only devices whose index is present in the sequence are visible to HIP. For example, -``` +```console $ HIP_VISIBLE_DEVICES=0,1 ``` or in the application, -``` +```cpp if (totalDeviceNum > 2) { setenv("HIP_VISIBLE_DEVICES", "0,1,2", 1); assert(getDeviceNumber(false) == 3); @@ -272,7 +257,7 @@ The following is the summary of the most useful environment variables in HIP. (gdb) set env AMD_SERIALIZE_KERNEL 3 ``` - The fault will be caught by the runtime but was actually generated by an asynchronous command running on the GPU. So, the GDB backtrace will show a path in the runtime. -- To determine the true location of the fault, force the kernels to execute synchronously by seeing the environment variables AMD_SERIALIZE_KERNEL=3 AMD_SERIALIZE_COPY=3. This will force HIP runtime to wait for the kernel to finish executing before retuning. If the fault occurs during the execution of a kernel, you can see the code which launched the kernel inside the backtrace. A bit of guesswork is required to determine which thread is actually causing the issue - typically it will the thread which is waiting inside the libhsa-runtime64.so. +- To determine the true location of the fault, force the kernels to execute synchronously by seeing the environment variables AMD_SERIALIZE_KERNEL=3 AMD_SERIALIZE_COPY=3. This will force HIP runtime to wait for the kernel to finish executing before retuning. If the fault occurs during the execution of a kernel, you can see the code which launched the kernel inside the backtrace. A bit of guesswork is required to determine which thread is actually causing the issue - typically it will the thread which is waiting inside the `libhsa-runtime64.so`. - VM faults inside kernels can be caused by: - incorrect code (ie a for loop which extends past array boundaries), - memory issues - kernel arguments which are invalid (null pointers, unregistered host pointers, bad pointers), diff --git a/projects/hip/INSTALL.md b/projects/hip/docs/how_to_guides/install.md similarity index 83% rename from projects/hip/INSTALL.md rename to projects/hip/docs/how_to_guides/install.md index 6d40178cc8..b8b38a0199 100644 --- a/projects/hip/INSTALL.md +++ b/projects/hip/docs/how_to_guides/install.md @@ -1,16 +1,4 @@ -## Table of Contents - - - -- [Install HIP](#installing-hip) - * [Prerequisites](#prerequisites) - * [AMD Platform](#amd-platform) - * [NVIDIA Platform](#nvidia-platform) -- [Verify your installation](#verify-your-installation) -- [How to build HIP from source](#how-to-build-hip-from-source) - - -# Install HIP +# Installing HIP HIP can be installed either on AMD ROCm platform with HIP-Clang compiler, or a CUDA platform with nvcc installed. @@ -59,6 +47,7 @@ Run hipconfig (instructions below assume default installation path) : # How to build HIP from source -Developers can build HIP from source on either AMD or NVIDIA platforms, see detail instructions at [building HIP] (docs/markdown/hip_build.md). +Developers can build HIP from source on either AMD or NVIDIA platforms, see +detailed instructions at {doc}`/developer_guide/build` diff --git a/projects/hip/docs/index.md b/projects/hip/docs/index.md new file mode 100644 index 0000000000..a2a7c89f20 --- /dev/null +++ b/projects/hip/docs/index.md @@ -0,0 +1,37 @@ +# HIP Documentation + +HIP is a C++ runtime API and kernel language that allows developers to create +portable applications for AMD and NVIDIA GPUs from single source code. + +## Overview + +::::{grid} 1 1 2 2 +:gutter: 1 + +:::{grid-item-card} User Guide +- {doc}`/user_guide/programming_manual` +- {doc}`/user_guide/hip_rtc` +- {doc}`/user_guide/faq` +::: + +:::{grid-item-card} How to Guides +- {doc}`/how_to_guides/install` +- {doc}`/how_to_guides/debugging` +::: + +:::{grid-item-card} Reference +- {doc}`/.doxygen/docBin/html/index` + - {doc}`/.doxygen/docBin/html/modules` +- {doc}`/reference/kernel_language` +- {doc}`/reference/math_api` +- {doc}`/reference/terms` +- {doc}`/reference/deprecated_api_list` +::: + +:::{grid-item-card} Developer Guide +- {doc}`/developer_guide/build` +- {doc}`/developer_guide/logging` +- {doc}`/developer_guide/contributing` +::: + +:::: \ No newline at end of file diff --git a/projects/hip/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md b/projects/hip/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md deleted file mode 100644 index c5649e36d6..0000000000 --- a/projects/hip/docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md +++ /dev/null @@ -1 +0,0 @@ -Document has been moved to https://github.com/ROCm-Developer-Tools/HIPIFY/blob/master/doc/markdown/CUDA_Driver_API_functions_supported_by_HIP.md diff --git a/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md b/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md deleted file mode 100644 index da4e226c11..0000000000 --- a/projects/hip/docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md +++ /dev/null @@ -1,1121 +0,0 @@ -# CUDA Runtime API functions supported by HIP - -## **1. Device Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-----------------------------------|:----------------:| -| `cudaChooseDevice` | `hipChooseDevice` | -| `cudaDeviceGetAttribute` | `hipDeviceGetAttribute` | -| `cudaDeviceGetByPCIBusId` | `hipDeviceGetByPCIBusId` | -| `cudaDeviceGetCacheConfig` | `hipDeviceGetCacheConfig` | -| `cudaDeviceGetLimit` | `hipDeviceGetLimit` | -| `cudaDeviceGetNvSciSyncAttributes` | | 10.2 | -| `cudaDeviceGetPCIBusId` | `hipDeviceGetPCIBusId` | -| `cudaDeviceGetSharedMemConfig` | `hipDeviceGetSharedMemConfig` | -| `cudaDeviceGetStreamPriorityRange` | `hipDeviceGetStreamPriorityRange` | -| `cudaDeviceReset` | `hipDeviceReset` | -| `cudaDeviceSetCacheConfig` | `hipDeviceSetCacheConfig` | -| `cudaDeviceSetLimit` | `hipDeviceSetLimit` | -| `cudaDeviceSetSharedMemConfig` | `hipDeviceSetSharedMemConfig` | -| `cudaDeviceSynchronize` | `hipDeviceSynchronize` | -| `cudaGetDevice` | `hipGetDevice` | -| `cudaGetDeviceCount` | `hipGetDeviceCount` | -| `cudaGetDeviceFlags` | `hipCtxGetFlags` | -| `cudaGetDeviceProperties` | `hipGetDeviceProperties` | -| `cudaIpcCloseMemHandle` | `hipIpcCloseMemHandle` | -| `cudaIpcGetEventHandle` | `hipIpcGetEventHandle` | -| `cudaIpcGetMemHandle` | `hipIpcGetMemHandle` | -| `cudaIpcOpenEventHandle` | `hipIpcOpenEventHandle` | -| `cudaIpcOpenMemHandle` | `hipIpcOpenMemHandle` | -| `cudaSetDevice` | `hipSetDevice` | -| `cudaSetDeviceFlags` | `hipSetDeviceFlags` | -| `cudaSetValidDevices` | | -| `cudaDeviceGetP2PAttribute` | | 8.0 | - -## **2. Thread Management [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaThreadExit` | `hipDeviceReset` | -| `cudaThreadGetCacheConfig` | `hipDeviceGetCacheConfig` | -| `cudaThreadGetLimit` | | -| `cudaThreadSetCacheConfig` | `hipDeviceSetCacheConfig` | -| `cudaThreadSetLimit` | | -| `cudaThreadSynchronize` | `hipDeviceSynchronize` | - -## **3. Error Handling** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaGetErrorName` | `hipGetErrorName` | -| `cudaGetErrorString` | `hipGetErrorString` | -| `cudaGetLastError` | `hipGetLastError` | -| `cudaPeekAtLastError` | `hipPeekAtLastError` | - -## **4. Stream Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaStreamAddCallback` | `hipStreamAddCallback` | -| `cudaStreamAttachMemAsync` | | -| `cudaStreamBeginCapture` | | 10.0 | -| `cudaStreamEndCapture` | | 10.0 | -| `cudaStreamIsCapturing` | | 10.0 | -| `cudaStreamGetCaptureInfo` | | 10.1 | -| `cudaStreamCreate` | `hipStreamCreate` | -| `cudaStreamCreateWithFlags` | `hipStreamCreateWithFlags` | -| `cudaStreamCreateWithPriority` | `hipStreamCreateWithPriority` | -| `cudaStreamDestroy` | `hipStreamDestroy` | -| `cudaStreamGetFlags` | `hipStreamGetFlags` | -| `cudaStreamGetPriority` | `hipStreamGetPriority` | -| `cudaStreamQuery` | `hipStreamQuery` | -| `cudaStreamSynchronize` | `hipStreamSynchronize` | -| `cudaStreamWaitEvent` | `hipStreamWaitEvent` | -| `cudaThreadExchangeStreamCaptureMode` | | 10.1 | - -## **5. Event Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaEventCreate` | `hipEventCreate` | -| `cudaEventCreateWithFlags` | `hipEventCreateWithFlags` | -| `cudaEventDestroy` | `hipEventDestroy` | -| `cudaEventElapsedTime` | `hipEventElapsedTime` | -| `cudaEventQuery` | `hipEventQuery` | -| `cudaEventRecord` | `hipEventRecord` | -| `cudaEventSynchronize` | `hipEventSynchronize` | - -## **6. External Resource Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaSignalExternalSemaphoresAsync` | | 10.0 | -| `cudaWaitExternalSemaphoresAsync` | | 10.0 | -| `cudaImportExternalMemory` | | 10.0 | -| `cudaExternalMemoryGetMappedBuffer` | | 10.0 | -| `cudaExternalMemoryGetMappedMipmappedArray` | | 10.0 | -| `cudaDestroyExternalMemory` | | 10.0 | -| `cudaImportExternalSemaphore` | | 10.0 | -| `cudaDestroyExternalSemaphore` | | 10.0 | - -## **7. Execution Control** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|---------------------------------------|:----------------:| -| `cudaFuncGetAttributes` |`hipFuncGetAttributes` | -| `cudaFuncSetAttribute` |`hipFuncSetAttribute` | 9.0 | -| `cudaFuncSetCacheConfig` |`hipFuncSetCacheConfig` | -| `cudaFuncSetSharedMemConfig` |`hipFuncSetSharedMemConfig` | -| `cudaGetParameterBuffer` | | -| `cudaGetParameterBufferV2` | | -| `cudaLaunchKernel` |`hipLaunchKernel` | -| `cudaSetDoubleForDevice` | | -| `cudaSetDoubleForHost` | | -| `cudaLaunchCooperativeKernel` |`hipLaunchCooperativeKernel` | 9.0 | -| `cudaLaunchCooperativeKernelMultiDevice` |`hipLaunchCooperativeKernelMultiDevice`| 9.0 | -| `cudaLaunchHostFunc` | | 10.0 | - -## **8. Occupancy** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------------------------------|:----------------:| -| `cudaOccupancyMaxActiveBlocksPerMultiprocessor` |`hipOccupancyMaxActiveBlocksPerMultiprocessor` | -| `cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` |`hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`| - -## **Former 9. Execution Control [DEPRECATED since 7.0, REMOVED since 10.1]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaConfigureCall` | `hipConfigureCall` | -| `cudaLaunch` | `hipLaunchByPtr` | -| `cudaSetupArgument` | `hipSetupArgument` | - -## **9. Memory Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaArrayGetInfo` | `hipArrayGetInfo` | -| `cudaFree` | `hipFree` | -| `cudaFreeArray` | `hipFreeArray` | -| `cudaFreeHost` | `hipHostFree` | -| `cudaFreeMipmappedArray` | | -| `cudaGetMipmappedArrayLevel` | | -| `cudaGetSymbolAddress` | `hipGetSymbolAddress` | -| `cudaGetSymbolSize` | `hipGetSymbolSize` | -| `cudaHostAlloc` | `hipHostMalloc` | -| `cudaHostGetDevicePointer` | `hipHostGetDevicePointer` | -| `cudaHostGetFlags` | `hipHostGetFlags` | -| `cudaHostRegister` | `hipHostRegister` | -| `cudaHostUnregister` | `hipHostUnregister` | -| `cudaMalloc` | `hipMalloc` | -| `cudaMalloc3D` | `hipMalloc3D` | -| `cudaMalloc3DArray` | `hipMalloc3DArray` | -| `cudaMallocArray` | `hipMallocArray` | -| `cudaMallocHost` | `hipHostMalloc` | -| `cudaMallocManaged` | `hipMallocManaged` | -| `cudaMallocMipmappedArray` | | -| `cudaMallocPitch` | | -| `cudaMemGetInfo` | `hipMemGetInfo` | -| `cudaMemPrefetchAsync` | | 8.0 | -| `cudaMemcpy` | `hipMemcpy` | -| `cudaMemcpy2D` | `hipMemcpy2D` | -| `cudaMemcpy2DArrayToArray` | | -| `cudaMemcpy2DAsync` | `hipMemcpy2DAsync` | -| `cudaMemcpy2DFromArray` | `hipMemcpy2DFromArray` | -| `cudaMemcpy2DFromArrayAsync` | `hipMemcpy2DFromArrayAsync` | -| `cudaMemcpy2DToArray` | `hipMemcpy2DToArray` | -| `cudaMemcpy2DToArrayAsync` | | -| `cudaMemcpy3D` | `hipMemcpy3D` | -| `cudaMemcpy3DAsync` | `hipMemcpy3DAsync` | -| `cudaMemcpy3DPeer` | | -| `cudaMemcpy3DPeerAsync` | | -| `cudaMemcpyAsync` | `hipMemcpyAsync` | -| `cudaMemcpyFromSymbol` | `hipMemcpyFromSymbol` | -| `cudaMemcpyFromSymbolAsync` | `hipMemcpyFromSymbolAsync` | -| `cudaMemcpyPeer` | `hipMemcpyPeer` | -| `cudaMemcpyPeerAsync` | `hipMemcpyPeerAsync` | -| `cudaMemcpyToSymbol` | `hipMemcpyToSymbol` | -| `cudaMemcpyToSymbolAsync` | `hipMemcpyToSymbolAsync` | -| `cudaMemset` | `hipMemset` | -| `cudaMemset2D` | `hipMemset2D` | -| `cudaMemset2DAsync` | `hipMemset2DAsync` | -| `cudaMemset3D` | `hipMemset3D` | -| `cudaMemset3DAsync` | `hipMemset3DAsync` | -| `cudaMemsetAsync` | `hipMemsetAsync` | -| `make_cudaExtent` | `make_hipExtent` | -| `make_cudaPitchedPtr` | `make_hipPitchedPtr` | -| `make_cudaPos` | `make_hipPos` | - -## **10. Memory Management [DEPRECATED since 10.1]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaMemcpyArrayToArray` | | -| `cudaMemcpyFromArray` | `hipMemcpyFromArray` | -| `cudaMemcpyFromArrayAsync` | | -| `cudaMemcpyToArray` | `hipMemcpyToArray` | -| `cudaMemcpyToArrayAsync` | | - -## **11. Unified Addressing** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaPointerGetAttributes` | `hipPointerGetAttributes` | - -## **12. Peer Device Memory Access** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaDeviceCanAccessPeer` | `hipDeviceCanAccessPeer` | -| `cudaDeviceDisablePeerAccess` | `hipDeviceDisablePeerAccess` | -| `cudaDeviceEnablePeerAccess` | `hipDeviceEnablePeerAccess` | - -## **13. OpenGL Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaGLGetDevices` | | -| `cudaGraphicsGLRegisterBuffer` | | -| `cudaGraphicsGLRegisterImage` | | -| `cudaWGLGetDevice` | | - -## **14. OpenGL Interoperability [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaGLMapBufferObject` | | -| `cudaGLMapBufferObjectAsync` | | -| `cudaGLRegisterBufferObject` | | -| `cudaGLSetBufferObjectMapFlags` | | -| `cudaGLSetGLDevice` | | -| `cudaGLUnmapBufferObject` | | -| `cudaGLUnmapBufferObjectAsync` | | -| `cudaGLUnregisterBufferObject` | | - -## **15. Direct3D 9 Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaD3D9GetDevice` | | -| `cudaD3D9GetDevices` | | -| `cudaD3D9GetDirect3DDevice` | | -| `cudaD3D9SetDirect3DDevice` | | -| `cudaGraphicsD3D9RegisterResource` | | - -## **16. Direct3D 9 Interoperability [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaD3D9MapResources` | | -| `cudaD3D9RegisterResource` | | -| `cudaD3D9ResourceGetMappedArray` | | -| `cudaD3D9ResourceGetMappedPitch` | | -| `cudaD3D9ResourceGetMappedPointer` | | -| `cudaD3D9ResourceGetMappedSize` | | -| `cudaD3D9ResourceGetSurfaceDimensions` | | -| `cudaD3D9ResourceSetMapFlags` | | -| `cudaD3D9UnmapResources` | | -| `cudaD3D9UnregisterResource` | | - -## **17. Direct3D 10 Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaD3D10GetDevice` | | -| `cudaD3D10GetDevices` | | -| `cudaGraphicsD3D10RegisterResource` | | - -## **18. Direct3D 10 Interoperability [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaD3D10GetDirect3DDevice` | | -| `cudaD3D10MapResources` | | -| `cudaD3D10RegisterResource` | | -| `cudaD3D10ResourceGetMappedArray` | | -| `cudaD3D10ResourceGetMappedPitch` | | -| `cudaD3D10ResourceGetMappedPointer` | | -| `cudaD3D10ResourceGetMappedSize` | | -| `cudaD3D10ResourceGetSurfaceDimensions` | | -| `cudaD3D10ResourceSetMapFlags` | | -| `cudaD3D10SetDirect3DDevice` | | -| `cudaD3D10UnmapResources` | | -| `cudaD3D10UnregisterResource` | | - -## **19. Direct3D 11 Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaD3D11GetDevice` | | -| `cudaD3D11GetDevices` | | -| `cudaGraphicsD3D11RegisterResource` | | - -## **20. Direct3D 11 Interoperability [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaD3D11GetDirect3DDevice` | | -| `cudaD3D11SetDirect3DDevice` | | - -## **21. VDPAU Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaGraphicsVDPAURegisterOutputSurface` | | -| `cudaGraphicsVDPAURegisterVideoSurface` | | -| `cudaVDPAUGetDevice` | | -| `cudaVDPAUSetVDPAUDevice` | | - -## **22. EGL Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaEGLStreamConsumerAcquireFrame` | | 8.0 | -| `cudaEGLStreamConsumerConnect` | | 8.0 | -| `cudaEGLStreamConsumerConnectWithFlags` | | 8.0 | -| `cudaEGLStreamConsumerDisconnect` | | 8.0 | -| `cudaEGLStreamConsumerReleaseFrame` | | 8.0 | -| `cudaEGLStreamProducerConnect` | | 8.0 | -| `cudaEGLStreamProducerDisconnect` | | 8.0 | -| `cudaEGLStreamProducerPresentFrame` | | 8.0 | -| `cudaEGLStreamProducerReturnFrame` | | 8.0 | -| `cudaEventCreateFromEGLSync` | | 9.0 | -| `cudaGraphicsEGLRegisterImage` | | 8.0 | -| `cudaGraphicsResourceGetMappedEglFrame` | | 8.0 | - -## **23. Graphics Interoperability** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaGraphicsMapResources` | | -| `cudaGraphicsResourceGetMappedMipmappedArray` | | -| `cudaGraphicsResourceGetMappedPointer` | | -| `cudaGraphicsResourceSetMapFlags` | | -| `cudaGraphicsSubResourceGetMappedArray` | | -| `cudaGraphicsUnmapResources` | | -| `cudaGraphicsUnregisterResource` | | - -## **24. Texture Reference Management [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|----------------------------------|:----------------:| -| `cudaBindTexture` | `hipBindTexture` | -| `cudaBindTexture2D` | `hipBindTexture2D` | -| `cudaBindTextureToArray` | `hipBindTextureToArray` | -| `cudaBindTextureToMipmappedArray` | `hipBindTextureToMipmappedArray` | -| `cudaCreateChannelDesc` | `hipCreateChannelDesc` | -| `cudaGetChannelDesc` | `hipGetChannelDesc` | -| `cudaGetTextureAlignmentOffset` | `hipGetTextureAlignmentOffset` | -| `cudaGetTextureReference` | `hipGetTextureReference` | -| `cudaUnbindTexture` | `hipUnbindTexture` | - -## **25. Surface Reference Management [DEPRECATED]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaBindSurfaceToArray` | | -| `cudaGetSurfaceReference` | | - -## **26. Texture Object Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|--------------------------------------|:----------------:| -| `cudaCreateTextureObject` |`hipCreateTextureObject` | -| `cudaDestroyTextureObject` |`hipDestroyTextureObject` | -| `cudaGetTextureObjectResourceDesc` |`hipGetTextureObjectResourceDesc` | -| `cudaGetTextureObjectResourceViewDesc` |`hipGetTextureObjectResourceViewDesc` | -| `cudaGetTextureObjectTextureDesc` |`hipGetTextureObjectTextureDesc` | - -## **27. Surface Object Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaCreateSurfaceObject` | `hipCreateSurfaceObject` | -| `cudaDestroySurfaceObject` | `hipDestroySurfaceObject` | -| `cudaGetSurfaceObjectResourceDesc` | | - -## **28. Version Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaDriverGetVersion` | `hipDriverGetVersion` | -| `cudaRuntimeGetVersion` | `hipRuntimeGetVersion` | - -## **29. Graph Management** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaGraphAddChildGraphNode` | | 10.0 | -| `cudaGraphAddDependencies` | | 10.0 | -| `cudaGraphAddEmptyNode` | | 10.0 | -| `cudaGraphAddHostNode` | | 10.0 | -| `cudaGraphAddKernelNode` | | 10.0 | -| `cudaGraphAddMemcpyNode` | | 10.0 | -| `cudaGraphAddMemsetNode` | | 10.0 | -| `cudaGraphChildGraphNodeGetGraph` | | 10.0 | -| `cudaGraphClone` | | 10.0 | -| `cudaGraphCreate` | | 10.0 | -| `cudaGraphDestroy` | | 10.0 | -| `cudaGraphDestroyNode` | | 10.0 | -| `cudaGraphExecDestroy` | | 10.0 | -| `cudaGraphGetEdges` | | 10.0 | -| `cudaGraphGetNodes` | | 10.0 | -| `cudaGraphGetRootNodes` | | 10.0 | -| `cudaGraphHostNodeGetParams` | | 10.0 | -| `cudaGraphHostNodeSetParams` | | 10.0 | -| `cudaGraphInstantiate` | | 10.0 | -| `cudaGraphExecKernelNodeSetParams` | | 10.1 | -| `cudaGraphExecMemcpyNodeSetParams` | | 10.2 | -| `cudaGraphExecMemsetNodeSetParams` | | 10.2 | -| `cudaGraphExecHostNodeSetParams` | | 10.2 | -| `cudaGraphExecUpdate` | | 10.2 | -| `cudaGraphKernelNodeGetParams` | | 10.0 | -| `cudaGraphKernelNodeSetParams` | | 10.0 | -| `cudaGraphLaunch` | | 10.0 | -| `cudaGraphMemcpyNodeGetParams` | | 10.0 | -| `cudaGraphMemcpyNodeSetParams` | | 10.0 | -| `cudaGraphMemsetNodeGetParams` | | 10.0 | -| `cudaGraphMemsetNodeSetParams` | | 10.0 | -| `cudaGraphNodeFindInClone` | | 10.0 | -| `cudaGraphNodeGetDependencies` | | 10.0 | -| `cudaGraphNodeGetDependentNodes` | | 10.0 | -| `cudaGraphNodeGetType` | | 10.0 | -| `cudaGraphRemoveDependencies` | | 10.0 | - -## **30. C++ API Routines [DEPRECATED since 7.5]** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------------------------------|:----------------:| -| `cudaBindSurfaceToArray` | | -| `cudaBindTexture` |`hipBindTexture` | -| `cudaBindTexture2D` | | -| `cudaBindTextureToArray` | | -| `cudaBindTextureToMipmappedArray` | | -| `cudaCreateChannelDesc` |`hipCreateChannelDesc` | -| `cudaEventCreate` | | -| `cudaFuncGetAttributes` | | -| `cudaFuncSetAttribute` | | -| `cudaFuncSetCacheConfig` | | -| `cudaGetSymbolAddress` |`hipGetSymbolAddress` | -| `cudaGetSymbolSize` |`hipGetSymbolSize` | -| `cudaGetTextureAlignmentOffset` | | -| `cudaLaunch` | | -| `cudaLaunchCooperativeKernel` |`hipLaunchCooperativeKernel` | -| `cudaLaunchCooperativeKernelMultiDevice` |`hipLaunchCooperativeKernelMultiDevice` | -| `cudaLaunchKernel` | | -| `cudaMallocHost` | | -| `cudaMallocManaged` | | -| `cudaMemcpyFromSymbol` | | -| `cudaMemcpyFromSymbolAsync` | | -| `cudaMemcpyToSymbol` | | -| `cudaMemcpyToSymbolAsync` | | -| `cudaOccupancyMaxPotentialBlockSize` |`hipOccupancyMaxPotentialBlockSize` | -| `cudaOccupancyMaxPotentialBlockSizeWithFlags` | | -| `cudaOccupancyMaxPotentialBlockSizeVariableSMem` | | -| `cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags` | | -| `cudaSetupArgument` | | -| `cudaStreamAttachMemAsync` | | -| `cudaUnbindTexture` |`hipUnbindTexture` | - -## **32. Profiler Control** - -| **CUDA** | **HIP** |**CUDA version\***| -|-----------------------------------------------------------|-------------------------------|:----------------:| -| `cudaProfilerInitialize` | | -| `cudaProfilerStart` | `hipProfilerStart` | -| `cudaProfilerStop` | `hipProfilerStop` | - -# Data types used by CUDA Runtime API and supported by HIP - -## **33. Data types** - -| **type** | **CUDA** |**CUDA version\***| **HIP** |**HIP value** (if differs) | -|-------------:|-----------------------------------------------------|:----------------:|------------------------------------------------------------|---------------------------| -| struct |`cudaChannelFormatDesc` | |`hipChannelFormatDesc` | -| struct |`cudaDeviceProp` | |`hipDeviceProp_t` | -| struct |`cudaEglFrame` | 9.1 | | -| typedef |`cudaEglFrame_st` | 9.1 | | -| struct |`cudaEglPlaneDesc` | 9.1 | | -| typedef |`cudaEglPlaneDesc_st` | 9.1 | | -| struct |`cudaExtent` | |`hipExtent` | -| struct |`cudaFuncAttributes` | |`hipFuncAttributes` | -| struct |`cudaIpcEventHandle_t` | |`hipIpcEventHandle_t` | -| struct |`cudaIpcMemHandle_t` | |`hipIpcMemHandle_t` | -| struct |`cudaMemcpy3DParms` | |`hipMemcpy3DParms` | -| struct |`cudaMemcpy3DPeerParms` | | | -| struct |`cudaPitchedPtr` | |`hipPitchedPtr` | -| struct |`cudaPointerAttributes` | |`hipPointerAttribute_t` | -| struct |`cudaPos` | |`hipPos` | -| struct |`cudaResourceDesc` | |`hipResourceDesc` | -| struct |`cudaResourceViewDesc` | |`hipResourceViewDesc` | -| struct |`cudaTextureDesc` | |`hipTextureDesc` | -| struct |`textureReference` | |`textureReference` | -| struct |`surfaceReference` | | | -| enum |***`cudaCGScope`*** | 9.0 | | -| 0 |*`cudaCGScopeInvalid`* | 9.0 | | -| 1 |*`cudaCGScopeGrid`* | 9.0 | | -| 2 |*`cudaCGScopeMultiGrid`* | 9.0 | | -| enum |***`cudaChannelFormatKind`*** | |***`hipChannelFormatKind`*** | -| 0 |*`cudaChannelFormatKindSigned`* | |*`hipChannelFormatKindSigned`* | -| 1 |*`cudaChannelFormatKindUnsigned`* | |*`hipChannelFormatKindUnsigned`* | -| 2 |*`cudaChannelFormatKindFloat`* | |*`hipChannelFormatKindFloat`* | -| 3 |*`cudaChannelFormatKindNone`* | |*`hipChannelFormatKindNone`* | -| enum |***`cudaComputeMode`*** | |***`hipComputeMode`*** | -| 0 |*`cudaComputeModeDefault`* | |*`hipComputeModeDefault`* | -| 1 |*`cudaComputeModeExclusive`* | |*`hipComputeModeExclusive`* | -| 2 |*`cudaComputeModeProhibited`* | |*`hipComputeModeProhibited`* | -| 3 |*`cudaComputeModeExclusiveProcess`* | |*`hipComputeModeExclusiveProcess`* | -| enum |***`cudaDeviceAttr`*** | |***`hipDeviceAttribute_t`*** | -| 1 |*`cudaDevAttrMaxThreadsPerBlock`* | |*`hipDeviceAttributeMaxThreadsPerBlock`* | -| 2 |*`cudaDevAttrMaxBlockDimX`* | |*`hipDeviceAttributeMaxBlockDimX`* | -| 3 |*`cudaDevAttrMaxBlockDimY`* | |*`hipDeviceAttributeMaxBlockDimY`* | -| 4 |*`cudaDevAttrMaxBlockDimZ`* | |*`hipDeviceAttributeMaxBlockDimZ`* | -| 5 |*`cudaDevAttrMaxGridDimX`* | |*`hipDeviceAttributeMaxGridDimX`* | -| 6 |*`cudaDevAttrMaxGridDimY`* | |*`hipDeviceAttributeMaxGridDimY`* | -| 7 |*`cudaDevAttrMaxGridDimZ`* | |*`hipDeviceAttributeMaxGridDimZ`* | -| 8 |*`cudaDevAttrMaxSharedMemoryPerBlock`* | |*`hipDeviceAttributeMaxSharedMemoryPerBlock`* | -| 9 |*`cudaDevAttrTotalConstantMemory`* | |*`hipDeviceAttributeTotalConstantMemory`* | -| 10 |*`cudaDevAttrWarpSize`* | |*`hipDeviceAttributeWarpSize`* | -| 11 |*`cudaDevAttrMaxPitch`* | |*`hipDeviceAttributeMaxPitch`* | -| 12 |*`cudaDevAttrMaxRegistersPerBlock`* | |*`hipDeviceAttributeMaxRegistersPerBlock`* | -| 13 |*`cudaDevAttrClockRate`* | |*`hipDeviceAttributeClockRate`* | -| 14 |*`cudaDevAttrTextureAlignment`* | |*`hipDeviceAttributeTextureAlignment`* | -| 15 |*`cudaDevAttrGpuOverlap`* | | | -| 16 |*`cudaDevAttrMultiProcessorCount`* | |*`hipDeviceAttributeMultiprocessorCount`* | -| 17 |*`cudaDevAttrKernelExecTimeout`* | |*`hipDeviceAttributeKernelExecTimeout`* | -| 18 |*`cudaDevAttrIntegrated`* | |*`hipDeviceAttributeIntegrated`* | -| 19 |*`cudaDevAttrCanMapHostMemory`* | |*`hipDeviceAttributeCanMapHostMemory`* | -| 20 |*`cudaDevAttrComputeMode`* | |*`hipDeviceAttributeComputeMode`* | -| 21 |*`cudaDevAttrMaxTexture1DWidth`* | |*`hipDeviceAttributeMaxTexture1DWidth`* | -| 22 |*`cudaDevAttrMaxTexture2DWidth`* | |*`hipDeviceAttributeMaxTexture2DWidth`* | -| 23 |*`cudaDevAttrMaxTexture2DHeight`* | |*`hipDeviceAttributeMaxTexture2DHeight`* | -| 24 |*`cudaDevAttrMaxTexture3DWidth`* | |*`hipDeviceAttributeMaxTexture3DWidth`* | -| 25 |*`cudaDevAttrMaxTexture3DHeight`* | |*`hipDeviceAttributeMaxTexture3DHeight`* | -| 26 |*`cudaDevAttrMaxTexture3DDepth`* | |*`hipDeviceAttributeMaxTexture3DDepth`* | -| 27 |*`cudaDevAttrMaxTexture2DLayeredWidth`* | | | -| 28 |*`cudaDevAttrMaxTexture2DLayeredHeight`* | | | -| 29 |*`cudaDevAttrMaxTexture2DLayeredLayers`* | | | -| 30 |*`cudaDevAttrSurfaceAlignment`* | | | -| 31 |*`cudaDevAttrConcurrentKernels`* | |*`hipDeviceAttributeConcurrentKernels`* | -| 32 |*`cudaDevAttrEccEnabled`* | |*`hipDeviceAttributeEccEnabled`* | -| 33 |*`cudaDevAttrPciBusId`* | |*`hipDeviceAttributePciBusId`* | -| 34 |*`cudaDevAttrPciDeviceId`* | |*`hipDeviceAttributePciDeviceId`* | -| 35 |*`cudaDevAttrTccDriver`* | | | -| 36 |*`cudaDevAttrMemoryClockRate`* | |*`hipDeviceAttributeMemoryClockRate`* | -| 37 |*`cudaDevAttrGlobalMemoryBusWidth`* | |*`hipDeviceAttributeMemoryBusWidth`* | -| 38 |*`cudaDevAttrL2CacheSize`* | |*`hipDeviceAttributeL2CacheSize`* | -| 39 |*`cudaDevAttrMaxThreadsPerMultiProcessor`* | |*`hipDeviceAttributeMaxThreadsPerMultiProcessor`* | -| 40 |*`cudaDevAttrAsyncEngineCount`* | | | -| 41 |*`cudaDevAttrUnifiedAddressing`* | | | -| 42 |*`cudaDevAttrMaxTexture1DLayeredWidth`* | | | -| 43 |*`cudaDevAttrMaxTexture1DLayeredLayers`* | | | -| 44 | | | | -| 45 |*`cudaDevAttrMaxTexture2DGatherWidth`* | | | -| 46 |*`cudaDevAttrMaxTexture2DGatherHeight`* | | | -| 47 |*`cudaDevAttrMaxTexture3DWidthAlt`* | | | -| 48 |*`cudaDevAttrMaxTexture3DHeightAlt`* | | | -| 49 |*`cudaDevAttrMaxTexture3DDepthAlt`* | | | -| 50 |*`cudaDevAttrPciDomainId`* | | | -| 51 |*`cudaDevAttrTexturePitchAlignment`* | | | -| 52 |*`cudaDevAttrMaxTextureCubemapWidth`* | | | -| 53 |*`cudaDevAttrMaxTextureCubemapLayeredWidth`* | | | -| 54 |*`cudaDevAttrMaxTextureCubemapLayeredLayers`* | | | -| 55 |*`cudaDevAttrMaxSurface1DWidth`* | | | -| 56 |*`cudaDevAttrMaxSurface2DWidth`* | | | -| 57 |*`cudaDevAttrMaxSurface2DHeight`* | | | -| 58 |*`cudaDevAttrMaxSurface3DWidth`* | | | -| 59 |*`cudaDevAttrMaxSurface3DHeight`* | | | -| 60 |*`cudaDevAttrMaxSurface3DDepth`* | | | -| 61 |*`cudaDevAttrMaxSurface1DLayeredWidth`* | | | -| 62 |*`cudaDevAttrMaxSurface1DLayeredLayers`* | | | -| 63 |*`cudaDevAttrMaxSurface2DLayeredWidth`* | | | -| 64 |*`cudaDevAttrMaxSurface2DLayeredHeight`* | | | -| 65 |*`cudaDevAttrMaxSurface2DLayeredLayers`* | | | -| 66 |*`cudaDevAttrMaxSurfaceCubemapWidth`* | | | -| 67 |*`cudaDevAttrMaxSurfaceCubemapLayeredWidth`* | | | -| 68 |*`cudaDevAttrMaxSurfaceCubemapLayeredLayers`* | | | -| 69 |*`cudaDevAttrMaxTexture1DLinearWidth`* | | | -| 70 |*`cudaDevAttrMaxTexture2DLinearWidth`* | | | -| 71 |*`cudaDevAttrMaxTexture2DLinearHeight`* | | | -| 72 |*`cudaDevAttrMaxTexture2DLinearPitch`* | | | -| 73 |*`cudaDevAttrMaxTexture2DMipmappedWidth* | | | -| 74 |*`cudaDevAttrMaxTexture2DMipmappedHeight`* | | | -| 75 |*`cudaDevAttrComputeCapabilityMajor`* | |*`hipDeviceAttributeComputeCapabilityMajor`* | -| 76 |*`cudaDevAttrComputeCapabilityMinor`* | |*`hipDeviceAttributeComputeCapabilityMinor`* | -| 77 |*`cudaDevAttrMaxTexture1DMipmappedWidth`* | | | -| 78 |*`cudaDevAttrStreamPrioritiesSupported`* | | | -| 79 |*`cudaDevAttrGlobalL1CacheSupported`* | | | -| 80 |*`cudaDevAttrLocalL1CacheSupported`* | | | -| 81 |*`cudaDevAttrMaxSharedMemoryPerMultiprocessor`* | |*`hipDeviceAttributeMaxSharedMemoryPerMultiprocessor`* | -| 82 |*`cudaDevAttrMaxRegistersPerMultiprocessor`* | | | -| 83 |*`cudaDevAttrManagedMemory`* | | | -| 84 |*`cudaDevAttrIsMultiGpuBoard`* | |*`hipDeviceAttributeIsMultiGpuBoard`* | -| 85 |*`cudaDevAttrMultiGpuBoardGroupID`* | | | -| 86 |*`cudaDevAttrHostNativeAtomicSupported`* | 8.0 | | -| 87 |*`cudaDevAttrSingleToDoublePrecisionPerfRatio`* | 8.0 | | -| 88 |*`cudaDevAttrPageableMemoryAccess`* | 8.0 | | -| 89 |*`cudaDevAttrConcurrentManagedAccess`* | 8.0 | | -| 90 |*`cudaDevAttrComputePreemptionSupported`* | 8.0 | | -| 91 |*`cudaDevAttrCanUseHostPointerForRegisteredMem`* | 8.0 | | -| 92 |*`cudaDevAttrReserved92`* | 9.0 | | -| 93 |*`cudaDevAttrReserved93`* | 9.0 | | -| 94 |*`cudaDevAttrReserved94`* | 9.0 | | -| 95 |*`cudaDevAttrCooperativeLaunch`* | 9.0 |*`hipDeviceAttributeCooperativeLaunch`* | -| 96 |*`cudaDevAttrCooperativeMultiDeviceLaunch`* | 9.0 |*`hipDeviceAttributeCooperativeMultiDeviceLaunch`* | -| 97 |*`cudaDevAttrMaxSharedMemoryPerBlockOptin`* | 9.0 | | -| 98 |*`cudaDevAttrCanFlushRemoteWrites`* | 9.2 | | -| 99 |*`cudaDevAttrHostRegisterSupported`* | 9.2 | | -| 100 |*`cudaDevAttrPageableMemoryAccessUsesHostPageTables`*| 9.2 | | -| 101 |*`cudaDevAttrDirectManagedMemAccessFromHost`* | 9.2 | | -| enum |***`cudaDeviceP2PAttr`*** | 8.0 | | -| 1 |*`cudaDevP2PAttrPerformanceRank`* | 8.0 | | -| 2 |*`cudaDevP2PAttrAccessSupported`* | 8.0 | | -| 3 |*`cudaDevP2PAttrNativeAtomicSupported`* | 8.0 | | -| 4 |*`cudaDevP2PAttrCudaArrayAccessSupported`* | 9.2 | | -| enum |***`cudaEglColorFormat`*** | 9.1 | | -| 0 |*`cudaEglColorFormatYUV420Planar`* | 9.1 | | -| 1 |*`cudaEglColorFormatYUV420SemiPlanar`* | 9.1 | | -| 2 |*`cudaEglColorFormatYUV422Planar`* | 9.1 | | -| 3 |*`cudaEglColorFormatYUV422SemiPlanar`* | 9.1 | | -| 4 |*`cudaEglColorFormatRGB`* | 9.1 | | -| 5 |*`cudaEglColorFormatBGR`* | 9.1 | | -| 6 |*`cudaEglColorFormatARGB`* | 9.1 | | -| 7 |*`cudaEglColorFormatRGBA`* | 9.1 | | -| 8 |*`cudaEglColorFormatL`* | 9.1 | | -| 9 |*`cudaEglColorFormatR`* | 9.1 | | -| 10 |*`cudaEglColorFormatYUV444Planar`* | 9.1 | | -| 11 |*`cudaEglColorFormatYUV444SemiPlanar`* | 9.1 | | -| 12 |*`cudaEglColorFormatYUYV422`* | 9.1 | | -| 13 |*`cudaEglColorFormatUYVY422`* | 9.1 | | -| 14 |*`cudaEglColorFormatABGR`* | 9.1 | | -| 15 |*`cudaEglColorFormatBGRA`* | 9.1 | | -| 16 |*`cudaEglColorFormatA`* | 9.1 | | -| 17 |*`cudaEglColorFormatRG`* | 9.1 | | -| 18 |*`cudaEglColorFormatAYUV`* | 9.1 | | -| 19 |*`cudaEglColorFormatYVU444SemiPlanar`* | 9.1 | | -| 20 |*`cudaEglColorFormatYVU422SemiPlanar`* | 9.1 | | -| 21 |*`cudaEglColorFormatYVU420SemiPlanar`* | 9.1 | | -| 22 |*`cudaEglColorFormatY10V10U10_444SemiPlanar`* | 9.1 | | -| 23 |*`cudaEglColorFormatY10V10U10_420SemiPlanar`* | 9.1 | | -| 24 |*`cudaEglColorFormatY12V12U12_444SemiPlanar`* | 9.1 | | -| 25 |*`cudaEglColorFormatY12V12U12_420SemiPlanar`* | 9.1 | | -| 26 |*`cudaEglColorFormatVYUY_ER`* | 9.1 | | -| 27 |*`cudaEglColorFormatUYVY_ER`* | 9.1 | | -| 28 |*`cudaEglColorFormatYUYV_ER`* | 9.1 | | -| 29 |*`cudaEglColorFormatYVYU_ER`* | 9.1 | | -| 30 |*`cudaEglColorFormatYUV_ER`* | 9.1 | | -| 31 |*`cudaEglColorFormatYUVA_ER`* | 9.1 | | -| 32 |*`cudaEglColorFormatAYUV_ER`* | 9.1 | | -| 33 |*`cudaEglColorFormatYUV444Planar_ER`* | 9.1 | | -| 34 |*`cudaEglColorFormatYUV422Planar_ER`* | 9.1 | | -| 35 |*`cudaEglColorFormatYUV420Planar_ER`* | 9.1 | | -| 36 |*`cudaEglColorFormatYUV444SemiPlanar_ER`* | 9.1 | | -| 37 |*`cudaEglColorFormatYUV422SemiPlanar_ER`* | 9.1 | | -| 38 |*`cudaEglColorFormatYUV420SemiPlanar_ER`* | 9.1 | | -| 39 |*`cudaEglColorFormatYVU444Planar_ER`* | 9.1 | | -| 40 |*`cudaEglColorFormatYVU422Planar_ER`* | 9.1 | | -| 41 |*`cudaEglColorFormatYVU420Planar_ER`* | 9.1 | | -| 42 |*`cudaEglColorFormatYVU444SemiPlanar_ER`* | 9.1 | | -| 43 |*`cudaEglColorFormatYVU422SemiPlanar_ER`* | 9.1 | | -| 44 |*`cudaEglColorFormatYVU420SemiPlanar_ER`* | 9.1 | | -| 45 |*`cudaEglColorFormatBayerRGGB`* | 9.1 | | -| 46 |*`cudaEglColorFormatBayerBGGR`* | 9.1 | | -| 47 |*`cudaEglColorFormatBayerGRBG`* | 9.1 | | -| 48 |*`cudaEglColorFormatBayerGBRG`* | 9.1 | | -| 49 |*`cudaEglColorFormatBayer10RGGB`* | 9.1 | | -| 50 |*`cudaEglColorFormatBayer10BGGR`* | 9.1 | | -| 51 |*`cudaEglColorFormatBayer10GRBG`* | 9.1 | | -| 52 |*`cudaEglColorFormatBayer10GBRG`* | 9.1 | | -| 53 |*`cudaEglColorFormatBayer12RGGB`* | 9.1 | | -| 54 |*`cudaEglColorFormatBayer12BGGR`* | 9.1 | | -| 55 |*`cudaEglColorFormatBayer12GRBG`* | 9.1 | | -| 56 |*`cudaEglColorFormatBayer12GBRG`* | 9.1 | | -| 57 |*`cudaEglColorFormatBayer14RGGB`* | 9.1 | | -| 58 |*`cudaEglColorFormatBayer14BGGR`* | 9.1 | | -| 59 |*`cudaEglColorFormatBayer14GRBG`* | 9.1 | | -| 60 |*`cudaEglColorFormatBayer14GBRG`* | 9.1 | | -| 61 |*`cudaEglColorFormatBayer20RGGB`* | 9.1 | | -| 62 |*`cudaEglColorFormatBayer20BGGR`* | 9.1 | | -| 63 |*`cudaEglColorFormatBayer20GRBG`* | 9.1 | | -| 64 |*`cudaEglColorFormatBayer20GBRG`* | 9.1 | | -| 65 |*`cudaEglColorFormatYVU444Planar`* | 9.1 | | -| 66 |*`cudaEglColorFormatYVU422Planar`* | 9.1 | | -| 67 |*`cudaEglColorFormatYVU420Planar`* | 9.1 | | -| 68 |*`cudaEglColorFormatBayerIspRGGB`* | 9.2 | | -| 69 |*`cudaEglColorFormatBayerIspBGGR`* | 9.2 | | -| 70 |*`cudaEglColorFormatBayerIspGRBG`* | 9.2 | | -| 71 |*`cudaEglColorFormatBayerIspGBRG`* | 9.2 | | -| enum |***`cudaEglFrameType`*** | 9.1 | | -| 0 |*`cudaEglFrameTypeArray`* | 9.1 | | -| 1 |*`cudaEglFrameTypePitch`* | 9.1 | | -| enum |***`cudaExternalMemoryHandleType`*** | 10.0 | | -| 1 |*`cudaExternalMemoryHandleTypeOpaqueFd`* | 10.0 | | -| 2 |*`cudaExternalMemoryHandleTypeOpaqueWin32`* | 10.0 | | -| 3 |*`cudaExternalMemoryHandleTypeOpaqueWin32Kmt`* | 10.0 | | -| 4 |*`cudaExternalMemoryHandleTypeD3D12Heap`* | 10.0 | | -| 5 |*`cudaExternalMemoryHandleTypeD3D12Resource`* | 10.0 | | -| 6 |*`cudaExternalMemoryHandleTypeD3D11Resource`* | 10.2 | | -| 7 |*`cudaExternalMemoryHandleTypeD3D11ResourceKmt`* | 10.2 | | -| 8 |*`cudaExternalMemoryHandleTypeNvSciBuf`* | 10.2 | | -| enum |***`cudaExternalSemaphoreHandleType`*** | 10.0 | | -| 1 |*`cudaExternalSemaphoreHandleTypeOpaqueFd`* | 10.0 | | -| 2 |*`cudaExternalSemaphoreHandleTypeOpaqueWin32`* | 10.0 | | -| 3 |*`cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt`* | 10.0 | | -| 4 |*`cudaExternalSemaphoreHandleTypeD3D12Fence`* | 10.0 | | -| 5 |*`cudaExternalSemaphoreHandleTypeD3D11Fence`* | 10.2 | | -| 6 |*`cudaExternalSemaphoreHandleTypeNvSciSync`* | 10.2 | | -| 7 |*`cudaExternalSemaphoreHandleTypeKeyedMutex`* | 10.2 | | -| 8 |*`cudaExternalSemaphoreHandleTypeKeyedMutexKmt`* | 10.2 | | -| enum |***`cudaFuncAttribute`*** | 9.0 | | -| 8 |*`cudaFuncAttributeMaxDynamicSharedMemorySize`* | 9.0 | | -| 9 |*`cudaFuncAttributePreferredSharedMemoryCarveout`* | 9.0 | | -| 10 |*`cudaFuncAttributeMax`* | 9.0 | | -| enum |***`cudaEglResourceLocationFlags`*** | 9.1 | | -| 0x00 |*`cudaEglResourceLocationSysmem`* | 9.1 | | -| 0x01 |*`cudaEglResourceLocationVidmem`* | 9.1 | | -| enum |***`cudaError`*** | |***`hipError_t`*** | -| typedef |***`cudaError_t`*** | |***`hipError_t`*** | -| 0 |*`cudaSuccess`* | |*`hipSuccess`* | -| 1 |*`cudaErrorInvalidValue`* | |*`hipErrorInvalidValue`* | -| 2 |*`cudaErrorMemoryAllocation`* | |*`hipErrorOutOfMemory`* | -| 3 |*`cudaErrorInitializationError`* | |*`hipErrorNotInitialized`* | -| 4 |*`cudaErrorCudartUnloading`* | |*`hipErrorDeinitialized`* | -| 5 |*`cudaErrorProfilerDisabled`* | |*`hipErrorProfilerDisabled`* | -| 6 |*`cudaErrorProfilerNotInitialized`* | |*`hipErrorProfilerNotInitialized`* | -| 7 |*`cudaErrorProfilerAlreadyStarted`* | |*`hipErrorProfilerAlreadyStarted`* | -| 8 |*`cudaErrorProfilerAlreadyStopped`* | |*`hipErrorProfilerAlreadyStopped`* | -| 9 |*`cudaErrorInvalidConfiguration`* | |*`hipErrorInvalidConfiguration`* | -| 12 |*`cudaErrorInvalidPitchValue`* | | | -| 13 |*`cudaErrorInvalidSymbol`* | |*`hipErrorInvalidSymbol`* | -| 16 |*`cudaErrorInvalidHostPointer`* | | | -| 17 |*`cudaErrorInvalidDevicePointer`* | |*`hipErrorInvalidDevicePointer`* | -| 18 |*`cudaErrorInvalidTexture`* | | | -| 19 |*`cudaErrorInvalidTextureBinding`* | | | -| 20 |*`cudaErrorInvalidChannelDescriptor`* | | | -| 21 |*`cudaErrorInvalidMemcpyDirection`* | |*`hipErrorInvalidMemcpyDirection`* | -| 22 |*`cudaErrorAddressOfConstant`* | | | -| 23 |*`cudaErrorTextureFetchFailed`* | | | -| 24 |*`cudaErrorTextureNotBound`* | | | -| 25 |*`cudaErrorSynchronizationError`* | | | -| 26 |*`cudaErrorInvalidFilterSetting`* | | | -| 27 |*`cudaErrorInvalidNormSetting`* | | | -| 28 |*`cudaErrorMixedDeviceExecution`* | | | -| 31 |*`cudaErrorNotYetImplemented`* | | | -| 32 |*`cudaErrorMemoryValueTooLarge`* | | | -| 35 |*`cudaErrorInsufficientDriver`* | |*`hipErrorInsufficientDriver`* | -| 37 |*`cudaErrorInvalidSurface`* | | | -| 43 |*`cudaErrorDuplicateVariableName`* | | | -| 44 |*`cudaErrorDuplicateTextureName`* | | | -| 45 |*`cudaErrorDuplicateSurfaceName`* | | | -| 46 |*`cudaErrorDevicesUnavailable`* | | | -| 49 |*`cudaErrorIncompatibleDriverContext`* | | | -| 52 |*`cudaErrorMissingConfiguration`* | |*`hipErrorMissingConfiguration`* | -| 53 |*`cudaErrorPriorLaunchFailure`* | |*`hipErrorPriorLaunchFailure`* | -| 65 |*`cudaErrorLaunchMaxDepthExceeded`* | | | -| 66 |*`cudaErrorLaunchFileScopedTex`* | | | -| 67 |*`cudaErrorLaunchFileScopedSurf`* | | | -| 68 |*`cudaErrorSyncDepthExceeded`* | | | -| 69 |*`cudaErrorLaunchPendingCountExceeded`* | | | -| 98 |*`cudaErrorInvalidDeviceFunction`* | |*`hipErrorInvalidDeviceFunction`* | -| 100 |*`cudaErrorNoDevice`* | |*`hipErrorNoDevice`* | -| 101 |*`cudaErrorInvalidDevice`* | |*`hipErrorInvalidDevice`* | -| 127 |*`cudaErrorStartupFailure`* | 10.0 | | -| 200 |*`cudaErrorInvalidKernelImage`* | |*`hipErrorInvalidImage`* | -| 201 |*`cudaErrorDeviceUninitilialized`* | |*`hipErrorInvalidContext`* | -| 205 |*`cudaErrorMapBufferObjectFailed`* | |*`hipErrorMapFailed`* | -| 206 |*`cudaErrorUnmapBufferObjectFailed`* | |*`hipErrorUnmapFailed`* | -| 209 |*`cudaErrorNoKernelImageForDevice`* | |*`hipErrorNoBinaryForGpu`* | -| 214 |*`cudaErrorECCUncorrectable`* | |*`hipErrorECCNotCorrectable`* | -| 215 |*`cudaErrorUnsupportedLimit`* | |*`hipErrorUnsupportedLimit`* | -| 216 |*`cudaErrorDeviceAlreadyInUse`* | | | -| 217 |*`cudaErrorPeerAccessUnsupported`* | |*`hipErrorPeerAccessUnsupported`* | -| 218 |*`cudaErrorInvalidPtx`* | |*`hipErrorInvalidKernelFile`* | -| 219 |*`cudaErrorInvalidGraphicsContext`* | |*`hipErrorInvalidGraphicsContext`* | -| 220 |*`cudaErrorNvlinkUncorrectable`* | 8.0 | | -| 221 |*`cudaErrorJitCompilerNotFound`* | 9.0 | | -| 300 |*`cudaErrorInvalidSource`* | 10.1 |*`hipErrorInvalidSource`* | -| 301 |*`cudaErrorFileNotFound`* | 10.1 |*`hipErrorFileNotFound`* | -| 302 |*`cudaErrorSharedObjectSymbolNotFound`* | |*`hipErrorSharedObjectSymbolNotFound`* | -| 303 |*`cudaErrorSharedObjectInitFailed`* | |*`hipErrorSharedObjectInitFailed`* | -| 304 |*`cudaErrorOperatingSystem`* | |*`hipErrorOperatingSystem`* | -| 400 |*`cudaErrorInvalidResourceHandle`* | |*`hipErrorInvalidHandle`* | -| 401 |*`cudaErrorIllegalState`* | 10.0 | | -| 500 |*`cudaErrorSymbolNotFound`* | 10.1 |*`hipErrorNotFound`* | -| 600 |*`cudaErrorNotReady`* | |*`hipErrorNotReady`* | -| 700 |*`cudaErrorIllegalAddress`* | |*`hipErrorIllegalAddress`* | -| 701 |*`cudaErrorLaunchOutOfResources`* | |*`hipErrorLaunchOutOfResources`* | -| 702 |*`cudaErrorLaunchTimeout`* | |*`hipErrorLaunchTimeOut`* | -| 703 |*`cudaErrorLaunchIncompatibleTexturing`* | | | -| 704 |*`cudaErrorPeerAccessAlreadyEnabled`* | |*`hipErrorPeerAccessAlreadyEnabled`* | -| 705 |*`cudaErrorPeerAccessNotEnabled`* | |*`hipErrorPeerAccessNotEnabled`* | -| 708 |*`cudaErrorSetOnActiveProcess`* | |*`hipErrorSetOnActiveProcess`* | -| 709 |*`cudaErrorContextIsDestroyed`* | | | -| 710 |*`cudaErrorAssert`* | |*`hipErrorAssert`* | -| 711 |*`cudaErrorTooManyPeers`* | | | -| 712 |*`cudaErrorHostMemoryAlreadyRegistered`* | |*`hipErrorHostMemoryAlreadyRegistered`* | -| 713 |*`cudaErrorHostMemoryNotRegistered`* | |*`hipErrorHostMemoryNotRegistered`* | -| 714 |*`cudaErrorHardwareStackError`* | | | -| 715 |*`cudaErrorIllegalInstruction`* | | | -| 716 |*`cudaErrorMisalignedAddress`* | | | -| 717 |*`cudaErrorInvalidAddressSpace`* | | | -| 718 |*`cudaErrorInvalidPc`* | | | -| 719 |*`cudaErrorLaunchFailure`* | |*`hipErrorLaunchFailure`* | -| 720 |*`cudaErrorCooperativeLaunchTooLarge`* | 9.0 |*`hipErrorCooperativeLaunchTooLarge`* | -| 800 |*`cudaErrorNotPermitted`* | | | -| 801 |*`cudaErrorNotSupported`* | |*`hipErrorNotSupported`* | -| 802 |*`cudaErrorSystemNotReady`* | 10.0 | | -| 803 |*`cudaErrorSystemDriverMismatch`* | 10.0 | | -| 804 |*`cudaErrorCompatNotSupportedOnDevice`* | 10.0 | | -| 900 |*`cudaErrorStreamCaptureUnsupported`* | 10.0 | | -| 901 |*`cudaErrorStreamCaptureInvalidated`* | 10.0 | | -| 902 |*`cudaErrorStreamCaptureMerge`* | 10.0 | | -| 903 |*`cudaErrorStreamCaptureUnmatched`* | 10.0 | | -| 904 |*`cudaErrorStreamCaptureUnjoined`* | 10.0 | | -| 905 |*`cudaErrorStreamCaptureIsolation`* | 10.0 | | -| 906 |*`cudaErrorStreamCaptureImplicit`* | 10.0 | | -| 907 |*`cudaErrorCapturedEvent`* | 10.0 | | -| 908 |*`cudaErrorStreamCaptureWrongThread`* | 10.1 | | -| 909 |*`cudaErrorTimeout`* | 10.2 | | -| 910 |*`cudaErrorGraphExecUpdateFailure`* | 10.2 | | -| 999 |*`cudaErrorUnknown`* | |*`hipErrorUnknown`* | -| 10000 |*`cudaErrorApiFailureBase`* | | | -| enum |***`cudaFuncCache`*** | |***`hipFuncCache_t`*** | -| 0 |*`cudaFuncCachePreferNone`* | |*`hipFuncCachePreferNone`* | -| 1 |*`cudaFuncCachePreferShared`* | |*`hipFuncCachePreferShared`* | -| 2 |*`cudaFuncCachePreferL1`* | |*`hipFuncCachePreferL1`* | -| 3 |*`cudaFuncCachePreferEqual`* | |*`hipFuncCachePreferEqual`* | -| enum |***`cudaGraphicsCubeFace`*** | | | -| 0x00 |*`cudaGraphicsCubeFacePositiveX`* | | | -| 0x01 |*`cudaGraphicsCubeFaceNegativeX`* | | | -| 0x02 |*`cudaGraphicsCubeFacePositiveY`* | | | -| 0x03 |*`cudaGraphicsCubeFaceNegativeY`* | | | -| 0x04 |*`cudaGraphicsCubeFacePositiveZ`* | | | -| 0x05 |*`cudaGraphicsCubeFaceNegativeZ`* | | | -| enum |***`cudaGraphicsMapFlags`*** | | | -| 0 |*`cudaGraphicsMapFlagsNone`* | | | -| 1 |*`cudaGraphicsMapFlagsReadOnly`* | | | -| 2 |*`cudaGraphicsMapFlagsWriteDiscard`* | | | -| enum |***`cudaGraphicsRegisterFlags`*** | | | -| 0 |*`cudaGraphicsRegisterFlagsNone`* | | | -| 1 |*`cudaGraphicsRegisterFlagsReadOnly`* | | | -| 2 |*`cudaGraphicsRegisterFlagsWriteDiscard`* | | | -| 4 |*`cudaGraphicsRegisterFlagsSurfaceLoadStore`* | | | -| 8 |*`cudaGraphicsRegisterFlagsTextureGather`* | | | -| enum |***`cudaGraphNodeType`*** | 10.0 | | -| 0x00 |*`cudaGraphNodeTypeKernel`* | 10.0 | | -| 0x01 |*`cudaGraphNodeTypeMemcpy`* | 10.0 | | -| 0x02 |*`cudaGraphNodeTypeMemset`* | 10.0 | | -| 0x03 |*`cudaGraphNodeTypeHost`* | 10.0 | | -| 0x04 |*`cudaGraphNodeTypeGraph`* | 10.0 | | -| 0x05 |*`cudaGraphNodeTypeEmpty`* | 10.0 | | -| |*`cudaGraphNodeTypeCount`* | 10.0 | | -| enum |***`cudaLimit`*** | |***`hipLimit_t`*** | -| 0x00 |*`cudaLimitStackSize`* | | | -| 0x01 |*`cudaLimitPrintfFifoSize`* | |*`hipLimitPrintfFifoSize`* | -| 0x02 |*`cudaLimitMallocHeapSize`* | |*`hipLimitMallocHeapSize`* | -| 0x03 |*`cudaLimitDevRuntimeSyncDepth`* | | | -| 0x04 |*`cudaLimitDevRuntimePendingLaunchCount`* | | | -| 0x05 |*`cudaLimitMaxL2FetchGranularity`* | 10.0 | | -| enum |***`cudaMemcpyKind`*** | |***`hipMemcpyKind`*** | -| 0 |*`cudaMemcpyHostToHost`* | |*`hipMemcpyHostToHost`* | -| 1 |*`cudaMemcpyHostToDevice`* | |*`hipMemcpyHostToDevice`* | -| 2 |*`cudaMemcpyDeviceToHost`* | |*`hipMemcpyDeviceToHost`* | -| 3 |*`cudaMemcpyDeviceToDevice`* | |*`hipMemcpyDeviceToDevice`* | -| 4 |*`cudaMemcpyDefault`* | |*`hipMemcpyDefault`* | -| enum |***`cudaMemoryAdvise`*** | 8.0 | | -| 1 |*`cudaMemAdviseSetReadMostly`* | 8.0 | | -| 2 |*`cudaMemAdviseUnsetReadMostly`* | 8.0 | | -| 3 |*`cudaMemAdviseSetPreferredLocation`* | 8.0 | | -| 4 |*`cudaMemAdviseUnsetPreferredLocation`* | 8.0 | | -| 5 |*`cudaMemAdviseSetAccessedBy`* | 8.0 | | -| 6 |*`cudaMemAdviseUnsetAccessedBy`* | 8.0 | | -| enum |***`cudaMemoryType`*** | | | -| 0 |*`cudaMemoryTypeUnregistered`* | | | -| 1 |*`cudaMemoryTypeHost`* | | | -| 2 |*`cudaMemoryTypeDevice`* | | | -| 3 |*`cudaMemoryTypeManaged`* | 10.0 | | -| enum |***`cudaMemRangeAttribute`*** | 8.0 | | -| 1 |*`cudaMemRangeAttributeReadMostly`* | 8.0 | | -| 2 |*`cudaMemRangeAttributePreferredLocation`* | 8.0 | | -| 3 |*`cudaMemRangeAttributeAccessedBy`* | 8.0 | | -| 4 |*`cudaMemRangeAttributeLastPrefetchLocation`* | 8.0 | | -| enum |***`cudaResourceType`*** | |***`hipResourceType`*** | -| 0x00 |*`cudaResourceTypeArray`* | |*`hipResourceTypeArray`* | -| 0x01 |*`cudaResourceTypeMipmappedArray`* | |*`hipResourceTypeMipmappedArray`* | -| 0x02 |*`cudaResourceTypeLinear`* | |*`hipResourceTypeLinear`* | -| 0x03 |*`cudaResourceTypePitch2D`* | |*`hipResourceTypePitch2D`* | -| enum |***`cudaResourceViewFormat`*** | |***`hipResourceViewFormat`*** | -| 0x00 |*`cudaResViewFormatNone`* | |*`hipResViewFormatNone`* | -| 0x01 |*`cudaResViewFormatUnsignedChar1`* | |*`hipResViewFormatUnsignedChar1`* | -| 0x02 |*`cudaResViewFormatUnsignedChar2`* | |*`hipResViewFormatUnsignedChar2`* | -| 0x03 |*`cudaResViewFormatUnsignedChar4`* | |*`hipResViewFormatUnsignedChar4`* | -| 0x04 |*`cudaResViewFormatSignedChar1`* | |*`hipResViewFormatSignedChar1`* | -| 0x05 |*`cudaResViewFormatSignedChar2`* | |*`hipResViewFormatSignedChar2`* | -| 0x06 |*`cudaResViewFormatSignedChar4`* | |*`hipResViewFormatSignedChar4`* | -| 0x07 |*`cudaResViewFormatUnsignedShort1`* | |*`hipResViewFormatUnsignedShort1`* | -| 0x08 |*`cudaResViewFormatUnsignedShort2`* | |*`hipResViewFormatUnsignedShort2`* | -| 0x09 |*`cudaResViewFormatUnsignedShort4`* | |*`hipResViewFormatUnsignedShort4`* | -| 0x0a |*`cudaResViewFormatSignedShort1`* | |*`hipResViewFormatSignedShort1`* | -| 0x0b |*`cudaResViewFormatSignedShort2`* | |*`hipResViewFormatSignedShort2`* | -| 0x0c |*`cudaResViewFormatSignedShort4`* | |*`hipResViewFormatSignedShort4`* | -| 0x0d |*`cudaResViewFormatUnsignedInt1`* | |*`hipResViewFormatUnsignedInt1`* | -| 0x0e |*`cudaResViewFormatUnsignedInt2`* | |*`hipResViewFormatUnsignedInt2`* | -| 0x0f |*`cudaResViewFormatUnsignedInt4`* | |*`hipResViewFormatUnsignedInt4`* | -| 0x10 |*`cudaResViewFormatSignedInt1`* | |*`hipResViewFormatSignedInt1`* | -| 0x11 |*`cudaResViewFormatSignedInt2`* | |*`hipResViewFormatSignedInt2`* | -| 0x12 |*`cudaResViewFormatSignedInt4`* | |*`hipResViewFormatSignedInt4`* | -| 0x13 |*`cudaResViewFormatHalf1`* | |*`hipResViewFormatHalf1`* | -| 0x14 |*`cudaResViewFormatHalf2`* | |*`hipResViewFormatHalf2`* | -| 0x15 |*`cudaResViewFormatHalf4`* | |*`hipResViewFormatHalf4`* | -| 0x16 |*`cudaResViewFormatFloat1`* | |*`hipResViewFormatFloat1`* | -| 0x17 |*`cudaResViewFormatFloat2`* | |*`hipResViewFormatFloat2`* | -| 0x18 |*`cudaResViewFormatFloat4`* | |*`hipResViewFormatFloat4`* | -| 0x19 |*`cudaResViewFormatUnsignedBlockCompressed1`* | |*`hipResViewFormatUnsignedBlockCompressed1`* | -| 0x1a |*`cudaResViewFormatUnsignedBlockCompressed2`* | |*`hipResViewFormatUnsignedBlockCompressed2`* | -| 0x1b |*`cudaResViewFormatUnsignedBlockCompressed3`* | |*`hipResViewFormatUnsignedBlockCompressed3`* | -| 0x1c |*`cudaResViewFormatUnsignedBlockCompressed4`* | |*`hipResViewFormatUnsignedBlockCompressed4`* | -| 0x1d |*`cudaResViewFormatSignedBlockCompressed4`* | |*`hipResViewFormatSignedBlockCompressed4`* | -| 0x1e |*`cudaResViewFormatUnsignedBlockCompressed5`* | |*`hipResViewFormatUnsignedBlockCompressed5`* | -| 0x1f |*`cudaResViewFormatSignedBlockCompressed5`* | |*`hipResViewFormatSignedBlockCompressed5`* | -| 0x20 |*`cudaResViewFormatUnsignedBlockCompressed6H`* | |*`hipResViewFormatUnsignedBlockCompressed6H`* | -| 0x21 |*`cudaResViewFormatSignedBlockCompressed6H`* | |*`hipResViewFormatSignedBlockCompressed6H`* | -| 0x22 |*`cudaResViewFormatUnsignedBlockCompressed7`* | |*`hipResViewFormatUnsignedBlockCompressed7`* | -| enum |***`cudaSharedMemConfig`*** | |***`hipSharedMemConfig`*** | -| 0 |*`cudaSharedMemBankSizeDefault`* | |*`hipSharedMemBankSizeDefault`* | -| 1 |*`cudaSharedMemBankSizeFourByte`* | |*`hipSharedMemBankSizeFourByte`* | -| 2 |*`cudaSharedMemBankSizeEightByte`* | |*`hipSharedMemBankSizeEightByte`* | -| enum |***`cudaSharedCarveout`*** | 9.0 | | -| -1 |*`cudaSharedmemCarveoutDefault`* | 9.0 | | -| 100 |*`cudaSharedmemCarveoutMaxShared`* | 9.0 | | -| 0 |*`cudaSharedmemCarveoutMaxL1`* | 9.0 | | -| enum |***`cudaStreamCaptureStatus`*** | 10.0 | | -| 0 |*`cudaStreamCaptureStatusNone`* | 10.0 | | -| 1 |*`cudaStreamCaptureStatusActive`* | 10.0 | | -| 2 |*`cudaStreamCaptureStatusInvalidated`* | 10.0 | | -| enum |***`cudaStreamCaptureMode`*** | 10.1 | | -| 0 |*`cudaStreamCaptureModeGlobal`* | 10.1 | | -| 1 |*`cudaStreamCaptureModeThreadLocal`* | 10.1 | | -| 2 |*`cudaStreamCaptureModeRelaxed`* | 10.1 | | -| enum |***`cudaSurfaceBoundaryMode`*** | |***`hipSurfaceBoundaryMode`*** | -| 0 |*`cudaBoundaryModeZero`* | |*`hipBoundaryModeZero`* | -| 1 |*`cudaBoundaryModeClamp`* | |*`hipBoundaryModeClamp`* | -| 2 |*`cudaBoundaryModeTrap`* | |*`hipBoundaryModeTrap`* | -| enum |***`cudaSurfaceFormatMode`*** | | | -| 0 |*`cudaFormatModeForced`* | | | -| 1 |*`cudaFormatModeAuto`* | | | -| enum |***`cudaTextureAddressMode`*** | |***`hipTextureAddressMode`*** | -| 0 |*`cudaAddressModeWrap`* | |*`hipAddressModeWrap`* | -| 1 |*`cudaAddressModeClamp`* | |*`hipAddressModeClamp`* | -| 2 |*`cudaAddressModeMirror`* | |*`hipAddressModeMirror`* | -| 3 |*`cudaAddressModeBorder`* | |*`hipAddressModeBorder`* | -| enum |***`cudaTextureFilterMode`*** | |***`hipTextureFilterMode`*** | -| 0 |*`cudaFilterModePoint`* | |*`hipFilterModePoint`* | -| 1 |*`cudaFilterModeLinear`* | |*`hipFilterModeLinear`* | -| enum |***`cudaTextureReadMode`*** | |***`hipTextureReadMode`*** | -| 0 |*`cudaReadModeElementType`* | |*`hipReadModeElementType`* | -| 1 |*`cudaReadModeNormalizedFloat`* | |*`hipReadModeNormalizedFloat`* | -| enum |***`cudaGLDeviceList`*** | | | -| 1 |*`cudaGLDeviceListAll`* | | | -| 2 |*`cudaGLDeviceListCurrentFrame`* | | | -| 3 |*`cudaGLDeviceListNextFrame`* | | | -| enum |***`cudaGLMapFlags`*** | | | -| 0 |*`cudaGLMapFlagsNone`* | | | -| 1 |*`cudaGLMapFlagsReadOnly`* | | | -| 2 |*`cudaGLMapFlagsWriteDiscard`* | | | -| enum |***`cudaD3D9DeviceList`*** | | | -| 1 |*`cudaD3D9DeviceListAll`* | | | -| 2 |*`cudaD3D9DeviceListCurrentFrame`* | | | -| 3 |*`cudaD3D9DeviceListNextFrame`* | | | -| enum |***`cudaD3D9MapFlags`*** | | | -| 0 |*`cudaD3D9MapFlagsNone`* | | | -| 1 |*`cudaD3D9MapFlagsReadOnly`* | | | -| 2 |*`cudaD3D9MapFlagsWriteDiscard`* | | | -| enum |***`cudaD3D9RegisterFlags`*** | | | -| 0 |*`cudaD3D9RegisterFlagsNone`* | | | -| 1 |*`cudaD3D9RegisterFlagsArray`* | | | -| enum |***`cudaD3D10DeviceList`*** | | | -| 1 |*`cudaD3D10DeviceListAll`* | | | -| 2 |*`cudaD3D10DeviceListCurrentFrame`* | | | -| 3 |*`cudaD3D10DeviceListNextFrame`* | | | -| enum |***`cudaD3D10MapFlags`*** | | | -| 0 |*`cudaD3D10MapFlagsNone`* | | | -| 1 |*`cudaD3D10MapFlagsReadOnly`* | | | -| 2 |*`cudaD3D10MapFlagsWriteDiscard`* | | | -| enum |***`cudaD3D10RegisterFlags`*** | | | -| 0 |*`cudaD3D10RegisterFlagsNone`* | | | -| 1 |*`cudaD3D10RegisterFlagsArray`* | | | -| enum |***`cudaD3D11DeviceList`*** | | | -| 1 |*`cudaD3D11DeviceListAll`* | | | -| 2 |*`cudaD3D11DeviceListCurrentFrame`* | | | -| 3 |*`cudaD3D11DeviceListNextFrame`* | | | -| struct |`cudaArray` | |`hipArray` | -| typedef |`cudaArray_t` | |`hipArray_t` | -| typedef |`cudaArray_const_t` | |`hipArray_const_t` | -| typedef |`cudaEvent_t` | |`hipEvent_t` | -| struct |`CUevent_st` | |`ihipEvent_t` | -| struct |`cudaMipmappedArray` | |`hipMipmappedArray` | -| typedef |`cudaMipmappedArray_t` | |`hipMipmappedArray_t` | -| typedef |`cudaMipmappedArray_const_t` | |`hipMipmappedArray_const_t` | -| enum |***`cudaOutputMode`*** | | | -| typedef |***`cudaOutputMode_t`*** | | | -| 0x00 |*`cudaKeyValuePair`* | | | -| 0x01 |*`cudaCSV`* | | | -| typedef |`cudaStream_t` | |`hipStream_t` | -| struct |`CUstream_st` | |`ihipStream_t` | -| typedef |`cudaStreamCallback_t` | |`hipStreamCallback_t` | -| typedef |`cudaSurfaceObject_t` | |`hipSurfaceObject_t` | -| typedef |`cudaTextureObject_t` | |`hipTextureObject_t` | -| struct |`CUuuid_st` | | | -| typedef |`cudaUUID_t` | | | -| define |`CUDA_EGL_MAX_PLANES` | 9.1 | | -| define |`CUDA_IPC_HANDLE_SIZE` | | | -| define |`cudaArrayColorAttachment` | 10.0 | | -| define |`cudaArrayCubemap` | |`hipArrayCubemap` | -| define |`cudaArrayDefault` | |`hipArrayDefault` | -| define |`cudaArrayLayered` | |`hipArrayLayered` | -| define |`cudaArraySurfaceLoadStore` | |`hipArraySurfaceLoadStore` | -| define |`cudaArrayTextureGather` | |`hipArrayTextureGather` | -| define |`cudaCooperativeLaunchMultiDeviceNoPreSync` | 9.0 | | -| define |`cudaCooperativeLaunchMultiDeviceNoPostSync` | 9.0 | | -| define |`cudaCpuDeviceId` | 8.0 | | -| define |`cudaInvalidDeviceId` | 8.0 | | -| define |`cudaDeviceBlockingSync` | |`hipDeviceScheduleBlockingSync` | -| define |`cudaDeviceLmemResizeToMax` | |`hipDeviceLmemResizeToMax` | 0x16 | -| define |`cudaDeviceMapHost` | |`hipDeviceMapHost` | -| define |`cudaDeviceMask` | | | -| define |`cudaDevicePropDontCare` | | | -| define |`cudaDeviceScheduleAuto` | |`hipDeviceScheduleAuto` | -| define |`cudaDeviceScheduleBlockingSync` | |`hipDeviceScheduleBlockingSync` | -| define |`cudaDeviceScheduleMask` | |`hipDeviceScheduleMask` | -| define |`cudaDeviceScheduleSpin` | |`hipDeviceScheduleSpin` | -| define |`cudaDeviceScheduleYield` | |`hipDeviceScheduleYield` | -| define |`cudaEventDefault` | |`hipEventDefault` | -| define |`cudaEventBlockingSync` | |`hipEventBlockingSync` | -| define |`cudaEventDisableTiming` | |`hipEventDisableTiming` | -| define |`cudaEventInterprocess` | |`hipEventInterprocess` | -| define |`cudaHostAllocDefault` | |`hipHostMallocDefault` | -| define |`cudaHostAllocMapped` | |`hipHostMallocMapped` | -| define |`cudaHostAllocPortable` | |`hipHostMallocPortable` | -| define |`cudaHostAllocWriteCombined` | |`hipHostMallocWriteCombined` | -| define |`cudaHostRegisterDefault` | |`hipHostRegisterDefault` | -| define |`cudaHostRegisterIoMemory` | 7.5 |`hipHostRegisterIoMemory` | -| define |`cudaHostRegisterMapped` | |`hipHostRegisterMapped` | -| define |`cudaHostRegisterPortable` | |`hipHostRegisterPortable` | -| define |`cudaIpcMemLazyEnablePeerAccess` | |`hipIpcMemLazyEnablePeerAccess` | 0 | -| define |`cudaMemAttachGlobal` | |`hipMemAttachGlobal` | -| define |`cudaMemAttachHost` | |`hipMemAttachHost` | -| define |`cudaMemAttachSingle` | | | -| define |`cudaOccupancyDefault` | |`hipOccupancyDefault` | -| define |`cudaOccupancyDisableCachingOverride` | | | -| define |`cudaPeerAccessDefault` | | | -| define |`cudaStreamDefault` | |`hipStreamDefault` | -| define |`cudaStreamNonBlocking` | |`hipStreamNonBlocking` | -| define |`cudaStreamLegacy` | | | -| define |`cudaStreamPerThread` | | | -| define |`cudaTextureType1D` | |`hipTextureType1D` | -| define |`cudaTextureType2D` | |`hipTextureType2D` | -| define |`cudaTextureType3D` | |`hipTextureType3D` | -| define |`cudaTextureTypeCubemap` | |`hipTextureTypeCubemap` | -| define |`cudaTextureType1DLayered` | |`hipTextureType1DLayered` | -| define |`cudaTextureType2DLayered` | |`hipTextureType2DLayered` | -| define |`cudaTextureTypeCubemapLayered` | |`hipTextureTypeCubemapLayered` | -| enum |***`cudaDataType_t`*** | 8.0 |***`hipblasDatatype_t`*** | -| enum |***`cudaDataType`*** | 8.0 |***`hipblasDatatype_t`*** | -| 2 |*`CUDA_R_16F`* | 8.0 |*`HIPBLAS_R_16F`* | 150 | -| 6 |*`CUDA_C_16F`* | 8.0 |*`HIPBLAS_C_16F`* | 153 | -| 0 |*`CUDA_R_32F`* | 8.0 |*`HIPBLAS_R_32F`* | 151 | -| 4 |*`CUDA_C_32F`* | 8.0 |*`HIPBLAS_C_32F`* | 154 | -| 1 |*`CUDA_R_64F`* | 8.0 |*`HIPBLAS_R_64F`* | 152 | -| 5 |*`CUDA_C_64F`* | 8.0 |*`HIPBLAS_C_64F`* | 155 | -| 3 |*`CUDA_R_8I`* | 8.0 |*`HIPBLAS_R_8I`* | 160 | -| 7 |*`CUDA_C_8I`* | 8.0 |*`HIPBLAS_C_8I`* | 164 | -| 8 |*`CUDA_R_8U`* | 8.0 |*`HIPBLAS_R_8U`* | 161 | -| 9 |*`CUDA_C_8U`* | 8.0 |*`HIPBLAS_C_8U`* | 165 | -| 10 |*`CUDA_R_32I`* | 8.0 |*`HIPBLAS_R_32I`* | 162 | -| 11 |*`CUDA_C_32I`* | 8.0 |*`HIPBLAS_C_32I`* | 166 | -| 12 |*`CUDA_R_32U`* | 8.0 |*`HIPBLAS_R_32U`* | 163 | -| 13 |*`CUDA_C_32U`* | 8.0 |*`HIPBLAS_C_32U`* | 167 | -| struct |`cudaExternalMemoryBufferDesc` | 10.0 | | -| struct |`cudaExternalMemoryHandleDesc` | 10.0 | | -| struct |`cudaExternalMemoryMipmappedArrayDesc` | 10.0 | | -| struct |`cudaExternalSemaphoreHandleDesc` | 10.0 | | -| struct |`cudaExternalSemaphoreSignalParams` | 10.0 | | -| struct |`cudaExternalSemaphoreWaitParams` | 10.0 | | -| struct |`cudaHostNodeParams` | 10.0 | | -| struct |`cudaLaunchParams` | 9.0 |`hipLaunchParams` | -| struct |`cudaMemsetParams` | 10.0 | | -| struct |`CUeglStreamConnection_st` | 9.1 | | -| typedef |`cudaEglStreamConnection` | 9.1 | | -| define |`cudaExternalMemoryDedicated` | 10.0 | | -| define |`cudaExternalSemaphoreSignalSkipNvSciBufMemSync` | 10.2 | | -| define |`cudaExternalSemaphoreWaitSkipNvSciBufMemSync` | 10.2 | | -| define |`cudaNvSciSyncAttrSignal` | 10.2 | | -| define |`cudaNvSciSyncAttrWait` | 10.2 | | -| typedef |`cudaExternalMemory_t` | 10.0 | | -| struct |`CUexternalMemory_st` | 10.0 | | -| typedef |`cudaExternalSemaphore_t` | 10.0 | | -| struct |`CUexternalSemaphore_st` | 10.0 | | -| typedef |`cudaGraph_t` | 10.0 | | -| struct |`CUgraph_st` | 10.0 | | -| typedef |`cudaGraphNode_t` | 10.0 | | -| struct |`CUgraphNode_st` | 10.0 | | -| typedef |`cudaGraphExec_t` | 10.0 | | -| struct |`CUgraphExec_st` | 10.0 | | -| typedef |`cudaGraphicsResource_t` | | | -| struct |`cudaGraphicsResource` | | | -| typedef |`cudaHostFn_t` | 10.0 | | -| enum |***`libraryPropertyType`*** | 8.0 | | -| typedef |***`libraryPropertyType_t`*** | 8.0 | | -| 0 |*`MAJOR_VERSION`* | 8.0 | | -| 1 |*`MINOR_VERSION`* | 8.0 | | -| 2 |*`PATCH_LEVEL`* | 8.0 | | -| enum |***`cudaGraphExecUpdateResult`*** | 10.2 | | -| 0x0 |*`cudaGraphExecUpdateSuccess`* | 10.2 | | -| 0x1 |*`cudaGraphExecUpdateError`* | 10.2 | | -| 0x2 |*`cudaGraphExecUpdateErrorTopologyChanged`* | 10.2 | | -| 0x3 |*`cudaGraphExecUpdateErrorNodeTypeChanged`* | 10.2 | | -| 0x4 |*`cudaGraphExecUpdateErrorFunctionChanged`* | 10.2 | | -| 0x5 |*`cudaGraphExecUpdateErrorParametersChanged`* | 10.2 | | -| 0x6 |*`cudaGraphExecUpdateErrorNotSupported`* | 10.2 | | - -\* CUDA version, in which API has appeared and (optional) last version before abandoning it; no value in case of earlier versions < 7.5. diff --git a/projects/hip/docs/markdown/clang_options.md b/projects/hip/docs/markdown/clang_options.md deleted file mode 100644 index 01b7fa78ee..0000000000 --- a/projects/hip/docs/markdown/clang_options.md +++ /dev/null @@ -1,763 +0,0 @@ -# Support of Clang options - Clang version: clang version 12.0.0 927e2776dc0e4bb0119efbc5ea405b7425d7f4ac - -|Option|Support|Description| -|-------|------|-------| -|`-###`|Supported|`Print (but do not run) the commands to run for this compilation`| -|`--analyzer-output `|Supported|`Static analyzer report output format (html\|plist\|plist-multi-file\|plist-html\|sarif\|text).`| -|`--analyze`|Supported|`Run the static analyzer`| -|`-arcmt-migrate-emit-errors`|Unsupported|`Emit ARC errors even if the migrator can fix them`| -|`-arcmt-migrate-report-output `|Unsupported|`Output path for the plist report`| -|`-byteswapio`|Supported|`Swap byte-order for unformatted input/output`| -|`-B `|Supported|`Add to search path for binaries and object files used implicitly`| -|`-CC`|Supported|`Include comments from within macros in preprocessed output`| -|`-cl-denorms-are-zero`|Supported|`OpenCL only. Allow denormals to be flushed to zero.`| -|`-cl-fast-relaxed-math`|Supported|`OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.`| -|`-cl-finite-math-only`|Supported|`OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.`| -|`-cl-fp32-correctly-rounded-divide-sqrt`|Supported|`OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.`| -|`-cl-kernel-arg-info`|Supported|`OpenCL only. Generate kernel argument metadata.`| -|`-cl-mad-enable`|Supported|`OpenCL only. Allow use of less precise MAD computations in the generated binary.`| -|`-cl-no-signed-zeros`|Supported|`OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.`| -|`-cl-opt-disable`|Supported|`OpenCL only. This option disables all optimizations. By default optimizations are enabled.`| -|`-cl-single-precision-constant`|Supported|`OpenCL only. Treat double precision floating-point constant as single precision constant.`| -|`-cl-std=`|Supported|`OpenCL language standard to compile for.`| -|`-cl-strict-aliasing`|Supported|`OpenCL only. This option is added for compatibility with OpenCL 1.0.`| -|`-cl-uniform-work-group-size`|Supported|`OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel`| -|`-cl-unsafe-math-optimizations`|Supported|`OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.`| -|`--config `|Supported|`Specifies configuration file`| -|`--cuda-compile-host-device`|Supported|`Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations.`| -|`--cuda-device-only`|Supported|`Compile CUDA code for device only`| -|`--cuda-host-only`|Supported|`Compile CUDA code for host only. Has no effect on non-CUDA compilations.`| -|`--cuda-include-ptx=`|Unsupported|`Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.`| -|`--cuda-noopt-device-debug`|Unsupported|`Enable device-side debug info generation. Disables ptxas optimizations.`| -|`--cuda-path-ignore-env`|Unsupported|`Ignore environment variables to detect CUDA installation`| -|`--cuda-path=`|Unsupported|`CUDA installation path`| -|`-cxx-isystem `|Supported|`Add directory to the C++ SYSTEM include search path`| -|`-C`|Supported|`Include comments in preprocessed output`| -|`-c`|Supported|`Only run preprocess, compile, and assemble steps`| -|`-dD`|Supported|`Print macro definitions in -E mode in addition to normal output`| -|`-dependency-dot `|Supported|`Filename to write DOT-formatted header dependencies to`| -|`-dependency-file `|Supported|`Filename (or -) to write dependency output to`| -|`-dI`|Supported|`Print include directives in -E mode in addition to normal output`| -|`-dM`|Supported|`Print macro definitions in -E mode instead of normal output`| -|`-dsym-dir `|Unsupported|`Directory to output dSYM's (if any) to`| -|`-D `|Supported|`= Define to (or 1 if omitted)`| -|`-emit-ast`|Supported|`Emit Clang AST files for source inputs`| -|`-emit-interface-stubs`|Supported|`Generate Interface Stub Files.`| -|`-emit-llvm`|Supported|`Use the LLVM representation for assembler and object files`| -|`-emit-merged-ifs`|Supported|`Generate Interface Stub Files, emit merged text not binary.`| -|`--emit-static-lib`|Supported|`Enable linker job to emit a static library.`| -|`-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang`|Supported|`Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark`| -|`-E`|Supported|`Only run the preprocessor`| -|`-fAAPCSBitfieldLoad`|Unsupported|`Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).`| -|`-faddrsig`|Supported|`Emit an address-significance table`| -|`-faligned-allocation`|Supported|`Enable C++17 aligned allocation functions`| -|`-fallow-editor-placeholders`|Supported|`Treat editor placeholders as valid source code`| -|`-fallow-fortran-gnu-ext`|Supported|`Allow Fortran GNU extensions`| -|`-fansi-escape-codes`|Supported|`Use ANSI escape codes for diagnostics`| -|`-fapple-kext`|Unsupported|`Use Apple's kernel extensions ABI`| -|`-fapple-link-rtlib`|Unsupported|`Force linking the clang builtins runtime library`| -|`-fapple-pragma-pack`|Unsupported|`Enable Apple gcc-compatible #pragma pack handling`| -|`-fapplication-extension`|Unsupported|`Restrict code to those available for App Extensions`| -|`-fbackslash`|Supported|`Treat backslash as C-style escape character`| -|`-fbasic-block-sections=`|Supported|`Place each function's basic blocks in unique sections (ELF Only) : all \| labels \| none \| list=`| -|`-fblocks`|Supported|`Enable the 'blocks' language feature`| -|`-fborland-extensions`|Unsupported|`Accept non-standard constructs supported by the Borland compiler`| -|`-fbuild-session-file=`|Supported|`Use the last modification time of as the build session timestamp`| -|`-fbuild-session-timestamp=