1313#include " llvm/SYCLLowerIR/DeviceConfigFile.hpp"
1414#include " llvm/Support/CommandLine.h"
1515#include " llvm/Support/Path.h"
16+ #include " llvm/Support/VirtualFileSystem.h"
1617#include < sstream>
1718
1819using namespace clang ::driver;
@@ -55,7 +56,7 @@ const char *SYCLInstallationDetector::findLibspirvPath(
5556
5657 // If -fsycl-libspirv-path= is specified, try to use that path directly.
5758 if (Arg *A = Args.getLastArg (options::OPT_fsycl_libspirv_path_EQ)) {
58- if (llvm::sys::fs:: exists (A->getValue ()))
59+ if (D. getVFS (). exists (A->getValue ()))
5960 return A->getValue ();
6061
6162 return nullptr ;
@@ -68,8 +69,7 @@ const char *SYCLInstallationDetector::findLibspirvPath(
6869 SmallString<128 > LibraryPath (Path);
6970 llvm::sys::path::append (LibraryPath, a, b, c, Basename);
7071
71- if (Args.hasArgNoClaim (options::OPT__HASH_HASH_HASH) ||
72- llvm::sys::fs::exists (LibraryPath))
72+ if (D.getVFS ().exists (LibraryPath))
7373 return Args.MakeArgString (LibraryPath);
7474
7575 return nullptr ;
@@ -249,7 +249,8 @@ static bool selectBfloatLibs(const llvm::Triple &Triple, const Compilation &C,
249249 static llvm::SmallSet<StringRef, 8 > GPUArchsWithNBF16{
250250 " intel_gpu_pvc" , " intel_gpu_acm_g10" , " intel_gpu_acm_g11" ,
251251 " intel_gpu_acm_g12" , " intel_gpu_dg2_g10" , " intel_gpu_dg2_g11" ,
252- " intel_dg2_g12" , " intel_gpu_bmg_g21" , " intel_gpu_lnl_m" };
252+ " intel_dg2_g12" , " intel_gpu_bmg_g21" , " intel_gpu_lnl_m" ,
253+ " intel_gpu_ptl_h" , " intel_gpu_ptl_u" };
253254 const llvm::opt::ArgList &Args = C.getArgs ();
254255 bool NeedLibs = false ;
255256
@@ -291,7 +292,7 @@ static bool selectBfloatLibs(const llvm::Triple &Triple, const Compilation &C,
291292 auto checkBF = [](StringRef Device) {
292293 return Device.starts_with (" pvc" ) || Device.starts_with (" ats" ) ||
293294 Device.starts_with (" dg2" ) || Device.starts_with (" bmg" ) ||
294- Device.starts_with (" lnl" );
295+ Device.starts_with (" lnl" ) || Device. starts_with ( " ptl " ) ;
295296 };
296297
297298 auto checkSpirvJIT = [](StringRef Target) {
0 commit comments