Skip to content
Wei, Jimmy T edited this page Mar 10, 2023 · 1 revision

Requirements

oneAPI code samples are designed to be introductory in nature to aid in the understanding and education of developers in regards to oneAPI concepts.

At a minimum all code samples require the following:

General Requirements

  • readme.md file is required [Example(https://github.com/oneapi-src/oneAPI-samples/blob/development/DirectProgramming/DPC%2B%2B/CombinationalLogic/mandelbrot/README.md) Template
  • Build Tools
    • Linux- Must utilize cmake 3.4, unless the sample is going to be also used for Mac then use make
    • Mac- Use make
    • Windows - Visual Studio 2017
  • Compilers for dpcpp
    • Linux/Mac- dpcpp
    • Windows- dpcpp-cl
  • sample.json file is required, which defines automated testing and enables the sample browser
  • Sample must successfully exit with a return code
    • Fail: exit code with !=0
      • message to stdout beginning with the word “fail”
    • Success: exit code with 0
      • message to stdout beginning with the word “success"
  • Samples with cli inputs must have basic validation, example:
    • File size > 0
    • File present
    • XML/YML has basic schema validation if possible
  • CMakeLists.txt
    • If enforcing “(CMAKE_CXX_STANDARD)” then it must be “set(CMAKE_CXX_STANDARD 17)” as starting in 2021.3 Gaurd rails were established that may interfere with older versions

Legal and Security

The following items need to be performed prior to a PR being put in place

  • License.txt file is required as all samples should be MIT, use this license file
  • third-party-programs.txt (TPP) file is required if you are using any third-party dependencies, use this TPP license file
    • Note: if the third-party dependency is for something not already covered, this file needs to be updated before you add it to your project
  • Approval by oneAPI Samples Committee
  • OSPDT Approval (see Program Manager for assistance)
  • Compile using the following compiler flags and fix any warnings, the flags are: "-Wall -Wformat-security -Werror=format-security"
  • Protex (see Program Manager for assistance)
  • Bandit Scans (Python only)
  • IPLDT Scan (see Program Manager for assistance)
  • Virus scan
Clone this wiki locally