{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.Array.Accelerate.LLVM.PTX.Compile.Cache (
module Data.Array.Accelerate.LLVM.Compile.Cache
) where
import Data.Array.Accelerate.LLVM.Compile.Cache
import Data.Array.Accelerate.LLVM.PTX.Target
import Control.Monad.State
import Data.Version
import Foreign.CUDA.Analysis
import System.FilePath
import qualified Data.ByteString.Char8 as B8
import qualified Data.ByteString.Short.Char8 as S8
import Paths_accelerate_llvm_ptx
instance Persistent PTX where
targetCacheTemplate = do
dev <- gets ptxDeviceProperties
let Compute m n = computeCapability dev
return $ "accelerate-llvm-ptx-" ++ showVersion version
</> S8.unpack ptxTargetTriple
</> B8.unpack (ptxISAVersion m n)
</> "morp.sass"