Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

Commit 0a57d01

Browse files
committed
Compile fixes & Toolkit detection
1 parent e7e9039 commit 0a57d01

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Cudafy.sln

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Global
9393
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.Debug|x64.Build.0 = Debug|Any CPU
9494
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.LinuxDebug|x64.ActiveCfg = LinuxDebug|x64
9595
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.LinuxDebug|x64.Build.0 = LinuxDebug|x64
96-
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.Release|x64.ActiveCfg = Release|x64
97-
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.Release|x64.Build.0 = Release|x64
96+
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.Release|x64.ActiveCfg = Release|Any CPU
97+
{DD4D4125-CB55-4DBD-B9EA-7E0709921DBF}.Release|x64.Build.0 = Release|Any CPU
9898
{C9ED8E2D-B7EF-4FC7-B357-1880F4571373}.Debug|x64.ActiveCfg = Debug|x64
9999
{C9ED8E2D-B7EF-4FC7-B357-1880F4571373}.Debug|x64.Build.0 = Debug|x64
100100
{C9ED8E2D-B7EF-4FC7-B357-1880F4571373}.LinuxDebug|x64.ActiveCfg = LinuxDebug|x64

Cudafy/Compilers/NvccExe.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ internal static class NvccExe
1313
static string getToolkitBaseDir()
1414
{
1515
//Find Computing Toolkit in the default path
16-
string prFil = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
17-
prFil = Path.Combine(prFil, @"NVIDIA GPU Computing Toolkit\CUDA");
16+
string prFil = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"NVIDIA GPU Computing Toolkit\CdUDA");
1817

1918
if (Directory.Exists(prFil))
2019
{
@@ -23,6 +22,12 @@ static string getToolkitBaseDir()
2322
for (int i = ctDirs.Length; i > 0; i--)
2423
return Path.Combine(prFil, ctDirs[i - 1]);
2524
}
25+
else
26+
{
27+
Console.ForegroundColor = ConsoleColor.Red;
28+
Console.WriteLine("nVidia GPU Toolkit error: Could not find 'NVIDIA GPU Computing Toolkit' in default path. Modify the Cudafy/Compilers/NvccExe.cs file to change the path.");
29+
Console.ResetColor();
30+
}
2631

2732
throw new CudafyCompileException("nVidia GPU Toolkit error: Computing Toolkit was not found");
2833
}

0 commit comments

Comments
 (0)