commit c04da58ea30f81578b225a0786cfda2c97617963 Author: osbm Date: Tue Dec 10 19:00:20 2024 +0300 initial code diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..96a6e38 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1733686850, + "narHash": "sha256-NQEO/nZWWGTGlkBWtCs/1iF1yl2lmQ1oY/8YZrumn3I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "dd51f52372a20a93c219e8216fe528a648ffcbf4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..009ab43 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "cuda kernel compilation with nix"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; + + outputs = { self, nixpkgs }: { + + packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello; + + packages.x86_64-linux.default = self.packages.x86_64-linux.hello; + + }; +} diff --git a/main.cu b/main.cu new file mode 100644 index 0000000..9a2f787 --- /dev/null +++ b/main.cu @@ -0,0 +1,16 @@ +#include + +int main() +{ + int run_version, driver_version; + std::cout<< "Return Code Runtime Version: "; + std::cout<