https://github.com/Microsoft/CNTK
Raw File
Tip revision: 0e208365be18021f25c19a24ea34bf8e187926e7 authored by liqfu on 26 August 2018, 15:41:20 UTC
CNTK splice allows broadcast. This case is handled in the change. For noop (identity) ops, its inputs and outputs types shall be set according to upstream ops. ToBatch/ToSequence and Unpack Batch/Sequence ops added during model importing need tp be skipped. Model import need to handle ops with multiple outputs
Tip revision: 0e20836
CUDAPageLockedMemAllocator.h
#pragma once

#include "MemAllocator.h"

namespace Microsoft { namespace MSR { namespace CNTK {

#ifdef _WIN32
#ifdef MATH_EXPORTS
#define MATH_API __declspec(dllexport)
#else
#define MATH_API __declspec(dllimport)
#endif
#else // no DLLs on Linux
#define MATH_API
#endif

class MATH_API CUDAPageLockedMemAllocator : public MemAllocator
{
public:
    CUDAPageLockedMemAllocator(int deviceID);

    int GetDeviceId() const;
    void* Malloc(size_t size) override;
    void Free(void* p) override;
    static void* Malloc(size_t size, int deviceId);
    static void Free(void* p, int deviceId);

private:
    int m_deviceID;
};
} } }
back to top