<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <instrumentation>
        <events>
            <provider name="NV CUDA" guid="{675d0d6b-2a12-4703-85d1-d36829575a1c}" symbol="ETW_PROVIDER_NVCUDA_GUID"
                      resourceFileName="%SystemRoot%\system32\drivers\nvcuda64.dll" messageFileName="%SystemRoot%\system32\drivers\nvcuda64.dll">
                <channels>
                    <importChannel name="System" chid="SYSTEM" />
                </channels>
                <keywords>
                </keywords>
                <tasks>
                    <task name="CUdevice" value="1" message="$(string.Task.CUdevice)" />
                    <task name="CUcontext" value="2" message="$(string.Task.CUcontext)" />
                    <task name="CUstream" value="3" message="$(string.Task.CUstream)" />
                    <task name="Allocation" value="4" message="$(string.Task.Allocation)" />
                    <task name="VmmAllocation" value="5" message="$(string.Task.VmmAllocation)" />
                    <task name="VmmMapping" value="6" message="$(string.Task.VmmMapping)" />
                    <task name="VmmSetAccess" value="7" message="$(string.Task.VmmSetAccess)" />
                    <task name="DeviceSubmission" value="9" message="$(string.Task.DeviceSubmission)" />
                    <task name="Profiling" value="10" message="$(string.Task.Profiling)" />
                    <task name="Enumeration" value="11" message="$(string.Task.Enumeration)" />
                </tasks>
                <maps>
					<valueMap name="CudaApiType">
						<map value="0" message="$(string.CudaApiType.ApiUnknown)"/>
                        <!-- GENERATED_API_MAP_PLACEHOLDER -->
					</valueMap>
					<valueMap name="HwQueueType">
						<map value="0" message="$(string.HwQueueType.Compute)"/>
						<map value="1" message="$(string.HwQueueType.Copy)"/>
					</valueMap>
					<valueMap name="CtxOpType">
						<map value="0" message="$(string.CtxOpType.PushCurrent)"/>
						<map value="1" message="$(string.CtxOpType.PopCurrent)"/>
						<map value="2" message="$(string.CtxOpType.SetCurrent)"/>
					</valueMap>
					<valueMap name="VmmLocationType">
						<map value="1" message="$(string.VmmLocationType.Device)"/>
						<map value="2" message="$(string.VmmLocationType.Host)"/>
						<map value="3" message="$(string.VmmLocationType.HostNuma)"/>
						<map value="4" message="$(string.VmmLocationType.HostNumaCurrent)"/>
					</valueMap>
					<valueMap name="MemcpyOperandType">
						<map value="0" message="$(string.MemcpyOperandType.Ptr)"/>
						<map value="1" message="$(string.MemcpyOperandType.CUarray)"/>
					</valueMap>
                </maps>
                <templates>
                    <template tid="CUdeviceCreate">
                        <data name="CUdevice" inType="win:UInt32"/>
                        <data name="ordinal" inType="win:UInt32"/>
                        <data name="hDxgdmalAdapter" inType="win:HexInt64"/>
                        <data name="adapterLuid" inType="win:HexInt64"/>
                        <data name="hDxgdmalDevice" inType="win:HexInt64"/>
                        <data name="physicalAdapterIndex" inType="win:UInt32"/>
                    </template>

                    <template tid="CUcontextCreate">
                        <data name="CUcontext" inType="win:HexInt64"/>
                        <data name="CUdevice" inType="win:UInt32"/>
                        <data name="numHwQueues" inType="win:UInt32"/>
						<struct name="hwQueues" count="numHwQueues">
							<data name="hDxgdmalHwQueue" inType="win:HexInt64"/>
							<data name="hDxgdmalProgressFence" inType="win:HexInt64"/>
							<data name="type" inType="win:UInt32" map="HwQueueType"/>
							<data name="reserved" inType="win:UInt32"/>
						</struct>
                    </template>
                    <template tid="CUcontextDestroy">
                        <data name="CUcontext" inType="win:HexInt64"/>
                    </template>
                    <template tid="ContextStackOpInfo">
                        <data name="CUcontext" inType="win:HexInt64"/>
						<data name="operation" inType="win:UInt32" map="CtxOpType"/>
                    </template>

                    <template tid="CUstreamCreate">
                        <data name="CUstream" inType="win:HexInt64"/>
                    </template>
                    <template tid="CUstreamDestroy">
                        <data name="CUstream" inType="win:HexInt64"/>
                    </template>

                    <template tid="AllocationCreate">
                        <data name="devPtr" inType="win:HexInt64"/>
                        <data name="hostPtr" inType="win:HexInt64"/>
                        <data name="size" inType="win:HexInt64"/>
                        <data name="hDxgdmalPagingFence" inType="win:HexInt64"/>
                        <data name="pagingFenceValue" inType="win:HexInt64"/>
                        <data name="numWddmAllocations" inType="win:UInt32"/>
						<struct name="wddmAllocations" count="numWddmAllocations">
							<data name="hDxgdmalAllocation" inType="win:HexInt64"/>
						</struct>
                    </template>
                    <template tid="AllocationDestroy">
                        <data name="devPtr" inType="win:HexInt64"/>
                        <data name="hostPtr" inType="win:HexInt64"/>
                    </template>

                    <template tid="VmmAllocationCreate">
                        <data name="handle" inType="win:HexInt64"/>
                        <data name="size" inType="win:HexInt64"/>
						<data name="location" inType="win:UInt32" map="VmmLocationType"/>
						<data name="locationId" inType="win:UInt32"/>
                        <data name="numWddmAllocations" inType="win:UInt32"/>
						<struct name="wddmAllocations" count="numWddmAllocations">
							<data name="hDxgdmalAllocation" inType="win:HexInt64"/>
						</struct>
                    </template>
                    <template tid="VmmAllocationDestroy">
                        <data name="handle" inType="win:HexInt64"/>
                    </template>
                    <template tid="VmmMappingCreate">
                        <data name="ptr" inType="win:HexInt64"/>
                        <data name="handle" inType="win:HexInt64"/>
                        <data name="size" inType="win:HexInt64"/>
                    </template>
                    <template tid="VmmMappingDestroy">
                        <data name="ptr" inType="win:HexInt64"/>
                    </template>
                    <template tid="VmmSetAccessInfo">
                        <data name="ptr" inType="win:HexInt64"/>
                        <data name="size" inType="win:HexInt64"/>
						<data name="location" inType="win:UInt32" map="VmmLocationType"/>
						<data name="locationId" inType="win:UInt32"/>
                        <data name="hDxgdmalPagingFence" inType="win:HexInt64"/>
                        <data name="pagingFenceValue" inType="win:HexInt64"/>
                        <data name="numWddmAllocations" inType="win:UInt32"/>
						<struct name="wddmAllocations" count="numWddmAllocations">
							<data name="hDxgdmalAllocation" inType="win:HexInt64"/>
						</struct>
                    </template>

                    <template tid="KernelLaunchInfo">
                        <data name="kernelName" inType="win:UnicodeString"/>
                        <data name="CUstream" inType="win:HexInt64"/>
                        <data name="hDxgdmalHwQueue" inType="win:HexInt64"/>
                        <data name="releasedProgressFenceValue" inType="win:HexInt64"/>
                    </template>
                    <template tid="MemcpyInfo">
                        <data name="src" inType="win:HexInt64"/>
                        <data name="dst" inType="win:HexInt64"/>
                        <data name="size" inType="win:HexInt64"/>
                        <data name="CUstream" inType="win:HexInt64"/>
						<data name="srcType" inType="win:UInt32" map="MemcpyOperandType"/>
						<data name="dstType" inType="win:UInt32" map="MemcpyOperandType"/>
                        <data name="hDxgdmalHwQueue" inType="win:HexInt64"/>
                        <data name="releasedProgressFenceValue" inType="win:HexInt64"/>
                    </template>
                    <template tid="SubmissionInfo">
                        <data name="hDxgdmalHwQueue" inType="win:HexInt64"/>
                        <data name="progressFenceValue" inType="win:HexInt64"/>
                        <data name="CUstream" inType="win:HexInt64"/>
                        <data name="numAcquiredFences" inType="win:UInt32"/>
						<struct name="acquiredFences" count="numAcquiredFences">
							<data name="hDxgdmalFence" inType="win:HexInt64"/>
							<data name="fenceValue" inType="win:HexInt64"/>
						</struct>
                    </template>

                    <template tid="Profiling">
                        <data name="apiId" inType="win:UInt32" map="CudaApiType"/>
					</template>
                    <template tid="EnumerationInfo">
					</template>
                </templates>
				<opcodes>
					<opcode name="Create" value="10" symbol="NvcudaEtw_OpcodeCreate" message="$(string.Opcode.Create)"> An object create event </opcode>
					<opcode name="Destroy" value="11" symbol="NvcudaEtw_OpcodeDestroy" message="$(string.Opcode.Destroy)"> An object destroy event </opcode>
					<opcode name="DC_Create" value="12" symbol="NvcudaEtw_OpcodeDcCreate" message="$(string.Opcode.DcCreate)"> A trace collection object create event </opcode>
				</opcodes>
                <events>
                    <event
                        value="1"
                        symbol="NvcudaEtw_CUdeviceCreate"
                        task="CUdevice"
                        opcode="Create"
                        level="win:Informational"
                        template="CUdeviceCreate"
                    />
                    <event
                        value="2"
                        symbol="NvcudaETW_CUcontextCreate"
                        task="CUcontext"
                        opcode="Create"
                        level="win:Informational"
                        template="CUcontextCreate"
                    />
                    <event
                        value="3"
                        symbol="NvcudaETW_CUcontextDestroy"
                        task="CUcontext"
                        opcode="Destroy"
                        level="win:Informational"
                        template="CUcontextDestroy"
                    />
                    <event
                        value="4"
                        symbol="NvcudaETW_ContextStackOp"
                        task="CUcontext"
                        opcode="win:Info"
                        level="win:Informational"
                        template="ContextStackOpInfo"
                        message="$(string.Event.ContextStackOp)"
                    />
                    <event
                        value="5"
                        symbol="NvcudaETW_CUstreamCreate"
                        task="CUstream"
                        opcode="Create"
                        level="win:Informational"
                        template="CUstreamCreate"
                    />
                    <event
                        value="6"
                        symbol="NvcudaETW_CUstreamDestroy"
                        task="CUstream"
                        opcode="Destroy"
                        level="win:Informational"
                        template="CUstreamDestroy"
                    />

                    <event
                        value="7"
                        symbol="NvcudaETW_DeviceAllocationCreate"
                        task="Allocation"
                        opcode="Create"
                        level="win:Informational"
                        template="AllocationCreate"
                        message="$(string.Event.DeviceAllocation)"
                    />
                    <event
                        value="8"
                        symbol="NvcudaETW_DeviceAllocationDestroy"
                        task="Allocation"
                        opcode="Destroy"
                        level="win:Informational"
                        template="AllocationDestroy"
                        message="$(string.Event.DeviceAllocation)"
                    />
                    <event
                        value="9"
                        symbol="NvcudaETW_HostAllocationCreate"
                        task="Allocation"
                        opcode="Create"
                        level="win:Informational"
                        template="AllocationCreate"
                        message="$(string.Event.HostAllocation)"
                    />
                    <event
                        value="10"
                        symbol="NvcudaETW_HostAllocationDestroy"
                        task="Allocation"
                        opcode="Destroy"
                        level="win:Informational"
                        template="AllocationDestroy"
                        message="$(string.Event.HostAllocation)"
                    />
                    <event
                        value="11"
                        symbol="NvcudaETW_ManagedAllocationCreate"
                        task="Allocation"
                        opcode="Create"
                        level="win:Informational"
                        template="AllocationCreate"
                        message="$(string.Event.ManagedAllocation)"
                    />
                    <event
                        value="12"
                        symbol="NvcudaETW_ManagedAllocationDestroy"
                        task="Allocation"
                        opcode="Destroy"
                        level="win:Informational"
                        template="AllocationDestroy"
                        message="$(string.Event.ManagedAllocation)"
                    />

                    <event
                        value="13"
                        symbol="NvcudaETW_VmmAllocationCreate"
                        task="VmmAllocation"
                        opcode="Create"
                        level="win:Informational"
                        template="VmmAllocationCreate"
                        message="$(string.Event.VmmAllocation)"
                    />
                    <event
                        value="14"
                        symbol="NvcudaETW_VmmAllocationDestroy"
                        task="VmmAllocation"
                        opcode="Destroy"
                        level="win:Informational"
                        template="VmmAllocationDestroy"
                        message="$(string.Event.VmmAllocation)"
                    />
                    <event
                        value="15"
                        symbol="NvcudaETW_VmmMappingCreate"
                        task="VmmMapping"
                        opcode="Create"
                        level="win:Informational"
                        template="VmmMappingCreate"
                        message="$(string.Event.VmmMapping)"
                    />
                    <event
                        value="16"
                        symbol="NvcudaETW_VmmMappingDestroy"
                        task="VmmMapping"
                        opcode="Destroy"
                        level="win:Informational"
                        template="VmmMappingDestroy"
                        message="$(string.Event.VmmMapping)"
                    />
                    <event
                        value="17"
                        symbol="NvcudaETW_VmmSetAccess"
                        task="VmmSetAccess"
                        opcode="win:Info"
                        level="win:Informational"
                        template="VmmSetAccessInfo"
                        message="$(string.Event.VmmSetAccess)"
                    />

                    <event
                        value="18"
                        symbol="NvcudaETW_KernelLaunch"
                        task="DeviceSubmission"
                        opcode="win:Info"
                        level="win:Informational"
                        template="KernelLaunchInfo"
                        message="$(string.Event.KernelLaunch)"
                    />
                    <event
                        value="19"
                        symbol="NvcudaETW_Memcpy"
                        task="DeviceSubmission"
                        opcode="win:Info"
                        level="win:Informational"
                        template="MemcpyInfo"
                        message="$(string.Event.Memcpy)"
                    />
                    <event
                        value="20"
                        symbol="NvcudaETW_Submission"
                        task="DeviceSubmission"
                        opcode="win:Info"
                        level="win:Informational"
                        template="SubmissionInfo"
                        message="$(string.Event.Submission)"
                    />
                    <event
                        value="21"
                        symbol="NvcudaETW_ApiProfilingStart"
                        task="Profiling"
                        opcode="win:Start"
                        level="win:Informational"
                        template="Profiling"
                        message="$(string.Event.ApiProfiling)"
                    />
                    <event
                        value="22"
                        symbol="NvcudaETW_ApiProfilingStop"
                        task="Profiling"
                        opcode="win:Stop"
                        level="win:Informational"
                        template="Profiling"
                        message="$(string.Event.ApiProfiling)"
                    />
                    <event
                        value="23"
                        symbol="NvcudaEtw_CUdeviceDCCreate"
                        task="CUdevice"
                        opcode="DC_Create"
                        level="win:Informational"
                        template="CUdeviceCreate"
                    />
                    <event
                        value="24"
                        symbol="NvcudaETW_CUcontextDCCreate"
                        task="CUcontext"
                        opcode="DC_Create"
                        level="win:Informational"
                        template="CUcontextCreate"
                    />
                </events>
            </provider>
        </events>
    </instrumentation>
    <localization xmlns="http://schemas.microsoft.com/win/2004/08/events">
        <resources culture="en-US">
            <stringTable>
				<string id="Task.CUdevice" value="CUdevice" />
				<string id="Task.CUcontext" value="CUcontext" />
				<string id="Task.CUstream" value="CUstream" />
				<string id="Task.Allocation" value="Allocation" />
				<string id="Task.VmmAllocation" value="VmmAllocation" />
				<string id="Task.VmmMapping" value="VmmMapping" />
				<string id="Task.VmmSetAccess" value="VmmSetAccess" />
				<string id="Task.DeviceSubmission" value="DeviceSubmission" />
				<string id="Task.Profiling" value="Profiling" />
				<string id="Task.Enumeration" value="Enumeration" />
				
                <string id="ApiEventType.Begin" value="Begin" />
                <string id="ApiEventType.End" value="End" />
				<string id="HwQueueType.Compute" value="Compute" />
				<string id="HwQueueType.Copy" value="Copy" />
				<string id="CudaApiType.ApiUnknown" value="Unknown API"/>
				<string id="CtxOpType.PushCurrent" value ="Push current"/>
				<string id="CtxOpType.PopCurrent" value="Pop current"/>
				<string id="CtxOpType.SetCurrent" value="Set current"/>
				<string id="VmmLocationType.Device" value="Device"/>
				<string id="VmmLocationType.Host" value="Host"/>
				<string id="VmmLocationType.HostNuma" value="Host NUMA"/>
				<string id="VmmLocationType.HostNumaCurrent" value="Host NUMA current"/>
				<string id="MemcpyOperandType.Ptr" value="Pointer"/>
				<string id="MemcpyOperandType.CUarray" value="CUarray"/>

				<string id="Event.ContextStackOp" value="Context stack operation" />
				<string id="Event.DeviceAllocation" value="Device allocation" />
				<string id="Event.HostAllocation" value="Host allocation" />
				<string id="Event.ManagedAllocation" value="Managed allocation" />
				<string id="Event.VmmAllocation" value="VMM allocation" />
				<string id="Event.VmmMapping" value="VMM mapping" />
				<string id="Event.VmmSetAccess" value="VMM set access" />
				<string id="Event.KernelLaunch" value="Kernel launch" />
				<string id="Event.Memcpy" value="Memcpy" />
				<string id="Event.Submission" value="Submission" />
				<string id="Event.ApiProfiling" value="API" />
				<string id="Event.StateEnumeration" value="State Enumeration" />

				<string id="Opcode.Create" value="Create" />
				<string id="Opcode.Destroy" value="Destroy" />
				<string id="Opcode.DcCreate" value="DC Create" />

                <!-- GENERATED_API_STRINGS_PLACEHOLDER -->
            </stringTable>
        </resources>
    </localization>
</instrumentationManifest>

