Skip to content

=== v1.21.0 === (18 August 2023)

Compare
Choose a tag to compare
@aneshlya aneshlya released this 18 Aug 21:35
· 263 commits to main since this release

ISPC release with template function specializations support; changed rules for signed integer overflow, which match C/C++ behavior and lead to more aggressive optimizations; an enhanced ISPC Runtime; multiple stability and performance fixes and more. The release is based on patched LLVM 15.0.7.

Language changes:

  • Added support for function template specializations with explicit template arguments.
// Primary template
template <typename T, typename C> noinline int goo(T argGooOne, C argGooTwo);

// Specialization with explicit template arguments
template <> noinline int goo<int, float>(int argGooOne, float argGooTwo);

// Not supported yet: specialization with implicit template arguments (requires template arguments type deduction)
template <> noinline int goo(int argGooOne, float argGooTwo);
  • Modified behavior for signed integer overflow.

Now, in case of signed integer overflow, ispc will assume undefined behavior similar to C and C++. This change may cause compatibility issues. You can manage this behavior using the --[no-]wrap-signed-int compiler switch. The default behavior (before version 1.21.0) can be preserved by using --wrap-signed-int, which maintains defined wraparound behavior for signed integers, though it may limit some compiler optimizations.

New hardware support:

Added support of Intel Meteor Lake Xe-LPG graphics:

  • added two new ISPC targets: xelpg-x16 and xelpg-x8
  • added two new device names: mtl-m and mtl-p

Infrastructure changes:

  • ISPC now uses LLVM's new pass manager. Optimization pipeline was modified by introducing early LoopFullUnrollPass which matches ISPC unrolled loops with manually unrolled loops in many cases.
  • Introduced ISPC superbuild, which facilitates building ISPC with Xe dependencies (LLVM, L0, vc-intrinsics, SPIRV-Translator). It can generate an archive with dependencies or consume a pre-built archive to build ISPC only. It also enables generating LTO or LTO+PGO enabled builds of LLVM and ISPC.
  • Supported building ISPC with LLVM 16.

New compiler switches:

  • --mcmodel switch, which accepts small and large values. The definition is similar to gcc/clang. When large model is used, it enables programs larger than 2Gb.
  • --opt=disable-gathers and --opt=disable-scatters options, which disable generation of gathers and scatters instructions on platforms that support them (for performance experiments).
  • --[no-]wrap-signed-int switches, which [does not] preserve(s) wrap-around behavior on signed integer overflow.

ISPC Runtime improvements:

  • Added ispcrtSetTaskingCallbacks to the ISPCRT API, allowing the override of default implementations of ISPCLaunch, ISPCAlloc, and ISPCSync.
  • Removed compile-time Level Zero dependency from ISPCRT, no longer necessary after the ISPCRT split into CPU and GPU parts.

Recommended versions of Runtime Dependencies when targeting GPU:

Linux:

Alternatively, you can use a validated gfx driver stack supporting Intel® Arc™ available at https://dgpu-docs.intel.com/driver/installation.html

Windows:

Components revisions used in GPU-enabled build: