altimesh / hybridizer-basic-samples

Examples of C# code compiled to GPU by hybridizer
MIT License
237 stars 32 forks source link

Invalid config file during C++ project build #105

Open uler3161 opened 1 year ago

uler3161 commented 1 year ago

Please make sure items below are checked before creating a new issue:

Here's what I have: VS2022 with C++ support. CUDA 11.7 installed

License is confusing. Apparently there is none any more (essentials is free)? I entered two different email addresses in the license field and I haven't received an email. Not sure whether this is where my problem is or not.

I tried the samples and couldn't get the hello world to build. Then I started from scratch with the "Altimesh Hybridizer sample project CUDA 11.7" template and had the same issue. The C# projects build fine. The C++ projects result in this:

[INFO] : found type Altimesh.Hybridizer.Application.Program [INFO] : found method Void Main(System.String[]) [INFO] : Hybridizer Essentials (c) Altimesh 2011-2022 - 1.0.0.0 Invalid input file, expecting xml configuration file or assembly [INFO] : Fini Void Main(System.String[])

When I double click on the invalid input file message in visual studio, I'm brought to the BuildSatelliteTask in Hybridizer.targets. I don't think that's actually where the issue is. I think it's whatever is getting passed into hybridizer.exe as a config file. As best I can tell, what happens during C++ build is this:

Hybridizer.exe "path/to/c++/project/hybridizer-generated-sources/hybridizer.config"

I tested that and I get the same error. So, I assume this hybridizer.config file is messed up, but I can't figure out why.

Running hybridizer.exe without parameters shows that it can also take a path to the assembly dll and platform name. I entered the path to the c# executable since the hybridizer.config file suggested that's what it's looking for. Didn't know what to put for platform name. Anything I seem to put for platform name results in this:

usage : Hybridizer < configuration.xml | assembly.{dll|exe} | "--licenseDetails" >

I tried to figure out what this --licenseDetails thing is, but it doesn't seem to be an argument to hybridizer.exe, so I'm pretty confused there. Next thing I tried was just the path to the assembly file without a platform name. Got this:

[INFO] : found type Altimesh.Hybridizer.Application.Program [INFO] : found method Void Main(System.String[]) [INFO] : Hybridizer Essentials (c) Altimesh 2011-2022 - 1.0.0.0 [ERROR] : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Altimesh.Hybridizer.Application.BasicLicenseReader.ReadLicense(String source) at Altimesh.Hybridizer.Application.ILicenseReader.get_CurrentLicense() at Altimesh.Hybridizer.Application.Toolkit.Run(String[] args) at Altimesh.Hybridizer.Application.Program.Main(String[] args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Transcoder.CudaDotNet.CLRHostStarter.AppDomainStarter.RunContent(String args) [FATAL] : Internal Error 311 !

So I guess now I'm at a point that I don't have a license? I don't really know what I'm doing wrong, but seems like there's a lot of things going bad.

JeWaVe commented 1 year ago

Hi,

I can't reproduce the issue. Can you tell me :

then, can you post the content of hybridizer.base.config file (if exists) ? Can you post the content of the cuda vcxproj ?

Finally : don't try to invoke Hybridizer.exe directly

PS : thanks for the confusing license system (license is stored in registers and your email is just sent to us for monitoring -- absolutely no other use from our side) I will update strings and bindings so that it's clearer.

uler3161 commented 1 year ago

This was a marketplace install (https://marketplace.visualstudio.com/items?itemName=altimesh.AltimeshHybridizerExtensionEssentials).

I tried wiping everything (hybridizer and cuda) and reinstalling. Specifically I downgraded to 11.6 cuda. I also installed hybridizer via the extensions menu in visual studio this time around. For some strange reason, I am now seeing license errors. I'm not sure why. Only thing I did differently was I started to just type random characters into the Subscriptionid box to see what it would do. I closed without hitting subscribe, but it still seems to have messed something up. I may have to re-install again, assuming that will fix that particular problem.

I didn't realize there was a github link, but I see it now under releases. I may try that now that I realize it's there.

The "Altimesh Hybridizer sample project CUDA" project templates default to x64 and I left it that way.

I was only trying to run the exe directly to see if I could get more logging information, but I see that's not the case. It would be helpful if the message said more than just that the xml file is invalid. Assuming, of course, that is the problem.

Here is hybridizer.base.config:

<?xml version="1.0" encoding="utf-8"?>
<HybridizerMetaConfigFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Configuration>
    <ReconstructLoops>false</ReconstructLoops>
  </Configuration>
  <ConfigFile HybridType="" DllFullPath="C:\Users\Dan\source\repos\HybridizerSample1\HybridizerSample1\HybridizerSample1\bin\x64\Debug\HybridizerSample1.exe" PdbFullPath="C:\Users\Dan\source\repos\HybridizerSample1\HybridizerSample1\HybridizerSample1\bin\x64\Debug\HybridizerSample1.pdb" ResultFileName="result.xml" GenerateLineInformation="true" UseFunctionPointers="true" GenerateAllFile="true" GenerateHiddenStubs="true" UseHybridArrays="false" EnableExceptions="false" DelegateSupport="false" LinesPerFile="0" HybridizerJitterServicePath="C:\Program Files\Altimesh\Hybridizer Essentials\bin\Hybridizer.PTXJitterService.11.6.exe" HybridizerJitterServiceOptions="--gpu-architecture=auto;-G;--relocatable-device-code=false;-lineinfo;--std=c++14;-DNO_EXCEPTION">
    <TraceConfig>
      <MaxStackDumps>100</MaxStackDumps>
      <Enabled>false</Enabled>
      <StackOverflowThreshold>200</StackOverflowThreshold>
      <Level>2</Level>
    </TraceConfig>
    <HybridFlavor FlavorName="CUDA" GenerateCWrapper="false" BuiltInFileNames="C:\Program Files\Altimesh\Hybridizer Essentials\include\hybridizer.cuda.builtins;" />
    <DisplayLicenseDetails>false</DisplayLicenseDetails>
  </ConfigFile>
</HybridizerMetaConfigFile>

And hybridizer.config:

<?xml version="1.0" encoding="utf-8"?>
<HybridizerMetaConfigFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Configuration>
    <ReconstructLoops>false</ReconstructLoops>
  </Configuration>
  <ConfigFile HybridType="" DllFullPath="C:\Users\Dan\source\repos\HybridizerSample1\HybridizerSample1\HybridizerSample1\bin\x64\Debug\HybridizerSample1.exe" PdbFullPath="C:\Users\Dan\source\repos\HybridizerSample1\HybridizerSample1\HybridizerSample1\bin\x64\Debug\HybridizerSample1.pdb" ResultFileName="result.xml" GenerateLineInformation="true" UseFunctionPointers="true" GenerateAllFile="true" GenerateHiddenStubs="true" UseHybridArrays="false" EnableExceptions="false" Features="" DelegateSupport="false" LinesPerFile="0" HybridizerJitterServicePath="C:\Program Files\Altimesh\Hybridizer Essentials\bin\Hybridizer.PTXJitterService.11.6.exe" HybridizerJitterServiceOptions="--gpu-architecture=auto;-G;--relocatable-device-code=false;-lineinfo;--std=c++14;-DNO_EXCEPTION">
    <TraceConfig>
      <MaxStackDumps>100</MaxStackDumps>
      <Enabled>false</Enabled>
      <StackOverflowThreshold>200</StackOverflowThreshold>
      <Level>2</Level>
    </TraceConfig>
    <HybridFlavor FlavorName="CUDA" GenerateCWrapper="false" BuiltInFileNames="C:\Program Files\Altimesh\Hybridizer Essentials\include\hybridizer.cuda.builtins;" />
    <HybridElements HybridType="HybridizerSample1.Program">
      <HybridizedMethod MethodName="Run" MethodRename="HybridizerSample1x46Programx46Run" ForceEntryPoint="true">
        <ParameterTypes>
          <string>System.Int32</string>
          <string>System.Int32[]</string>
          <string>System.Int32[]</string>
        </ParameterTypes>
        <GenericParameters />
      </HybridizedMethod>
      <HybridFlavor FlavorName="CUDA" OutputFileName="HybridizerSample1.Program.cu" GenerateCWrapper="true" BuiltInFileNames="C:\Program Files\Altimesh\Hybridizer Essentials\include\hybridizer.cuda.builtins;" />
    </HybridElements>
    <DisplayLicenseDetails>false</DisplayLicenseDetails>
  </ConfigFile>
</HybridizerMetaConfigFile>

And finally, the vcxproj:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{bdaf2ddf-e0d3-44cb-b06e-34564d9b8698}</ProjectGuid>
    <RootNamespace>HybridizerSample2_CUDA</RootNamespace>
    <ProjectName>HybridizerSample2_CUDA</ProjectName>
    <HybridizerInstallPath>$(Registry:HKEY_CURRENT_USER\Software\ALTIMESH\Hybridizer@vsixInstallPath)</HybridizerInstallPath>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
    <MyToolset>v143</MyToolset>
  </PropertyGroup>
  <PropertyGroup Condition="'$(VisualStudioVersion)' == '16.0'">
    <MyToolset>v142</MyToolset>
  </PropertyGroup>
  <PropertyGroup Condition="'$(VisualStudioVersion)' == '15.0'">
    <MyToolset>v141</MyToolset>
  </PropertyGroup>
  <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'">
    <MyToolset>v140</MyToolset>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <CharacterSet>MultiByte</CharacterSet>
    <PlatformToolset>$(MyToolset)</PlatformToolset>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
    <PlatformToolset>$(MyToolset)</PlatformToolset>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
    <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 11.6.props" />
    <Import Project="$(HybridizerInstallPath)\vsintegration\Hybridizer.props" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup>
    <DotNetProjectName>$([System.String]::Copy(&quot;HybridizerSample2_CUDA&quot;).Replace(&quot;_CUDA&quot;,&quot;&quot;))</DotNetProjectName>
  </PropertyGroup>
  <PropertyGroup Label="HybridizerConfig" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <HybridizerFlavors>CUDA</HybridizerFlavors>
    <HybridizerBuiltInFiles>$(HybridizerInstallPath)\include\hybridizer.cuda.builtins</HybridizerBuiltInFiles>
    <HybridizerJitterServicePath>$(HybridizerInstallPath)\bin\Hybridizer.PTXJitterService.11.6.exe</HybridizerJitterServicePath>
    <HybridizerJitterServiceOptions>--gpu-architecture=auto;-G;--relocatable-device-code=false;-lineinfo;--std=c++14;-DNO_EXCEPTION</HybridizerJitterServiceOptions>
    <HybridizerDllFullPath>..\$(DotNetProjectName)\$(DotNetProjectName).csproj</HybridizerDllFullPath>
    <HybridizerBinaryPath>$(HybridizerInstallPath)\bin\Hybridizer.exe</HybridizerBinaryPath>
    <HybridizerBuildTask>$(HybridizerInstallPath)\bin\Hybridizer.VSIntegration.BuildSatelliteTask.dll</HybridizerBuildTask>
    <HybridizerBuildSatellite>$(HybridizerInstallPath)\bin\Hybridizer.VSIntegration.BuildSatellite.exe</HybridizerBuildSatellite>
    <HybridizerGenerateLineInformation>true</HybridizerGenerateLineInformation>
    <HybridizerUseFunctionPointers>true</HybridizerUseFunctionPointers>
    <HybridizerUseHybridArrays>false</HybridizerUseHybridArrays>
    <HybridizerDelegateSupport>false</HybridizerDelegateSupport>
    <HybridizerPlatform>x64</HybridizerPlatform>
    <HybridizerConfiguration>Debug</HybridizerConfiguration>
    <HybridizerWorkingDirectory>hybridizer-generated-sources</HybridizerWorkingDirectory>
  </PropertyGroup>
  <PropertyGroup Label="HybridizerConfig" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <HybridizerFlavors>CUDA</HybridizerFlavors>
    <HybridizerBuiltInFiles>$(HybridizerInstallPath)\include\hybridizer.cuda.builtins</HybridizerBuiltInFiles>
    <HybridizerJitterServicePath>$(HybridizerInstallPath)\bin\Hybridizer.PTXJitterService.11.6.exe</HybridizerJitterServicePath>
    <HybridizerJitterServiceOptions>--gpu-architecture=auto;--relocatable-device-code=false;-lineinfo;--std=c++14;-DNO_EXCEPTION</HybridizerJitterServiceOptions>
    <HybridizerDllFullPath>..\$(DotNetProjectName)\$(DotNetProjectName).csproj</HybridizerDllFullPath>
    <HybridizerBinaryPath>$(HybridizerInstallPath)\bin\Hybridizer.exe</HybridizerBinaryPath>
    <HybridizerBuildTask>$(HybridizerInstallPath)\bin\Hybridizer.VSIntegration.BuildSatelliteTask.dll</HybridizerBuildTask>
    <HybridizerBuildSatellite>$(HybridizerInstallPath)\bin\Hybridizer.VSIntegration.BuildSatellite.exe</HybridizerBuildSatellite>
    <HybridizerGenerateLineInformation>true</HybridizerGenerateLineInformation>
    <HybridizerUseFunctionPointers>true</HybridizerUseFunctionPointers>
    <HybridizerUseHybridArrays>false</HybridizerUseHybridArrays>
    <HybridizerDelegateSupport>false</HybridizerDelegateSupport>
    <HybridizerPlatform>x64</HybridizerPlatform>
    <HybridizerConfiguration>Release</HybridizerConfiguration>
    <HybridizerWorkingDirectory>hybridizer-generated-sources</HybridizerWorkingDirectory>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <SubSystem>Console</SubSystem>
      <AdditionalDependencies>cuda.lib;cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>$(HybridizerInstallPath)\bin;$(HybridizerInstallPath)\lib;%(AdditionalLibraryDirectories);$(CudaToolkitLibDir)</AdditionalLibraryDirectories>
    </Link>
    <PostBuildEvent>
      <Command>
        echo copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
        copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
      </Command>
    </PostBuildEvent>
    <CudaCompile>
      <TargetMachinePlatform>64</TargetMachinePlatform>
    </CudaCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <SubSystem>Console</SubSystem>
      <AdditionalDependencies>cuda.lib;cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>$(HybridizerInstallPath)\bin;$(HybridizerInstallPath)\lib;%(AdditionalLibraryDirectories);$(CudaToolkitLibDir)</AdditionalLibraryDirectories>
    </Link>
    <PostBuildEvent>
      <Command>
        echo copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
        copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
      </Command>
    </PostBuildEvent>
    <CudaCompile>
      <TargetMachinePlatform>64</TargetMachinePlatform>
    </CudaCompile>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="hybridizer-generated-sources\hybridizer.generated.cpp" />
  </ItemGroup>
  <ItemGroup>
    <CudaCompile Include="hybridizer-generated-sources\hybridizer.wrappers.cu" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
    <Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 11.6.targets" />
    <Import Project="$(HybridizerInstallPath)\vsintegration\Hybridizer.targets" />
  </ImportGroup>
</Project>
uler3161 commented 1 year ago

Ok, so I re-installed with the github link. I ended up getting an error about some missing .cu file. Decided to create a new project using the hybridizer template again. When I built that, I get the license error again:

C:\Program Files\Altimesh\Hybridizer Essentials\vsintegration\Hybridizer.targets(80,13): error : [FATAL] : [ERROR] LicenseException: Invalid license

You said the license is stored in registers, so I assume a registry entry? It must be corrupted on my computer now or something. An uninstall of hybridizer did not fix it. Are there specific registry keys I can delete to get this fixed?

uler3161 commented 1 year ago

Ok, got back to the original situation with invalid input file. Ended up uninstalling hybridizer and then cleaning what I could find in the registry. I suspect the presence of a subscriptionid key caused the issue, even though it was empty.

uler3161 commented 1 year ago

As maybe a secondary issue, I thought I'd try using VS 2017 to see if there was something VS 2022 was doing to cause this. The installer is not picking up the fact that I have VS 2017 installed. Maybe once it finds VS 2022 it quits looking for VS installs?

JeWaVe commented 1 year ago

Everything here looks weird. installer should pick up vs2022 and 2017 automatically if they are installed on your machines.

In your registries, you should see a key Computer\HKEY_CURRENT_USER\Software\Altimesh\Hybridizer\SubscriptionId with some random bytes as value. Is it the case ?

uler3161 commented 1 year ago

In your registries, you should see a key Computer\HKEY_CURRENT_USER\Software\Altimesh\Hybridizer\SubscriptionId with some random bytes as value. Is it the case ?

It is not the case.

After I cleared out the registry and re-installed, I hadn't yet enter my email address into the license screen. In that situation, the only key was vsixInstallPath.

After entering my email address, clicking Subscribe, and then clicking close, there is now an email key. But there is no subscription key.

Finally, I started to type random characters into the Subscriptionid box. I then cleared the box and hit close. This did generate a subscriptionid key which is empty. This also causes the following message:

[FATAL] : [ERROR] LicenseException: Invalid license

Deleting the subscriptionid key gets rid of the invalid license error and I'm back to my original error about an invalid input file.

I'm not sure the subscriptionid is really the main problem I'm having. Just judging from the error messages, I would guess that the licensing check passes if there is no subscriptionid. If so, the real problem seems to be that the part of hybridizer that generates the config file is generating something that the hybridizer exe can't read.

JeWaVe commented 1 year ago

Well, you must have a subscription ID set after getting through the "get license" path in VS. That's not normal at all and many things can fail if you don't. I'll double check that point today (are you admin on your machine ? )

uler3161 commented 1 year ago

Yes, I am admin.

I don't understand what you mean by "get license" path. Do you mean the Extensions -> Hybridizer -> License Settings menu? That's where I've been trying to do any licensing stuff. Only thing I can really do there is enter my email and hit subscribe. Which seems to work. It gives me a message saying I can proceed. But it definitely doesn't result in a subscriptionid getting created.

To be honest, it's really confusing how this works especially since there is a subscriptionid box on the screen. But given that I don't have a subscription id to enter, I can't put anything there. Can you verify that I'm not supposed to be entering a subscriptionid manually?

Usergitbit commented 1 year ago

I'm having this exact same issue. Getting a 'Invalid input file, expecting xml configuration file or assembly' when trying to build the C++ project and I have the same issue of the license in the registry being empty after inputting my mail and pressing subscribe and I received no email with any key.

EDIT: i got the subscription to work by uninstalling Hybridizer (initially installed by downloading from the marketplace website) and reinstalling with the one downloaded from Visual Studio. I also deleted the registry entries. But it still fails to build the HelloWorld project

2>
2>C:\Repos\hybridizer-basic-samples\HybridizerBasicSamples_CUDA\1.Simple\HelloWorld\HelloWorld_CUDA>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include"  -G   --keep-dir x64\Debug  -maxrregcount=0  --machine 64 --compile -cudart static  -g  -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fdx64\Debug\vc143.pdb /FS /Zi /RTC1 /MDd " -o x64\Debug\hybridizer.wrappers.cu.obj "C:\Repos\hybridizer-basic-samples\HybridizerBasicSamples_CUDA\1.Simple\HelloWorld\HelloWorld_CUDA\hybridizer-generated-sources\hybridizer.wrappers.cu"
2>C:\Repos\hybridizer-basic-samples\HybridizerBasicSamples_CUDA\1.Simple\HelloWorld\HelloWorld_CUDA\hybridizer-generated-sources\hybridizer.wrappers.cu(211): error : "cures" has already been declared in the current scope
2>
2>C:\Repos\hybridizer-basic-samples\HybridizerBasicSamples_CUDA\1.Simple\HelloWorld\HelloWorld_CUDA\hybridizer-generated-sources\hybridizer.wrappers.cu(190): warning #550-D: variable "cures" was set but never used
2>
2>C:\Repos\hybridizer-basic-samples\HybridizerBasicSamples_CUDA\1.Simple\HelloWorld\HelloWorld_CUDA\hybridizer-generated-sources\hybridizer.wrappers.cu(211): warning #550-D: variable "cures" was set but never used
2>
2>1 error detected in the compilation of "C:/Repos/hybridizer-basic-samples/HybridizerBasicSamples_CUDA/1.Simple/HelloWorld/HelloWorld_CUDA/hybridizer-generated-sources/hybridizer.wrappers.cu".
2>hybridizer.wrappers.cu
2>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 11.6.targets(790,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include"  -G   --keep-dir x64\Debug  -maxrregcount=0  --machine 64 --compile -cudart static  -g  -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_WINDLL -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fdx64\Debug\vc143.pdb /FS /Zi /RTC1 /MDd " -o x64\Debug\hybridizer.wrappers.cu.obj "C:\Repos\hybridizer-basic-samples\HybridizerBasicSamples_CUDA\1.Simple\HelloWorld\HelloWorld_CUDA\hybridizer-generated-sources\hybridizer.wrappers.cu"" exited with code 1.

I also tried the ConjugateGradient. Here it couldn't find the Hybridizer.Runtime.CUDAImports so I updated the installed nuget but it fails on runtime with System.DllNotFoundException: 'Unable to load DLL 'libcudart.so': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'. I'm using CUDA 11.6 because that's the one the projects seems to reference.

EDIT: managed to get the HelloWorld working by removing the cuda project and regenerating it. I got the ConjureGradient working by removing the nuget and adding a manual reference to C:\Program Files\Altimesh\Hybridizer Essentials\lib\Hybridizer.Runtime.CUDAImports.dll like the HelloWorld.

JeWaVe commented 1 year ago

ok. Thanks for reporting this issue and sorry for this inconvenience. Altimesh will release a new version (simplified) and open sourced in the coming weeks/months. Hope you can wait until then.