镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

New parallel scheduling system #99

Open

Description

@HyperCodec

Since the current implementation is a directed acyclic graph, it should be possible to perform a topological sort over the hidden layers and build an optimized set of stages/tensors for better performance and resource utilization. This would also open up the avenue for GPU parallelization via compute shaders or CUDA (though I haven't researched CUDA in depth yet).

However, due to the fact that the structure of these networks changes extremely often and the fact that I want to preserve the DAG model at this project's core, there can be a performance concern with having to rebuild these optimized structures every generation. Depending on the fitness function and the number of times they run predictions during each generation, using this structure could negatively impact performance. Thus, I believe that the original scheduling system should be preserved, while additionally offering this structure to the end user and encouraging its use.

Activity

  1. self-assigned this
    on Jan 21, 2026
  2. HyperCodec commented on Jan 21, 2026

    @HyperCodec
    OwnerAuthor

    Currently, this issue is not a priority, since a significant portion of the time spent is likely during the actual mutation process. There is still a lot of work that needs to be done to optimize that part of the crate.

  3. marked [TODO] Cuda support #60 as a duplicate of this issue on Jan 21, 2026
  4. HyperCodec commented on Jun 20, 2026

    @HyperCodec
    OwnerAuthor

    Another thing that I could add is a phantomdata reference to the original network to ensure that it is never mutated until the helper is dropped.

    Something like this:

    struct Foo<'a> {
        a: PhantomData<&'a Bar>,
    }
  5. HyperCodec commented on Jun 20, 2026

    @HyperCodec
    OwnerAuthor

    Another thing that I could add is a phantomdata reference to the original network to ensure that it is never mutated until the helper is dropped.

    Something like this:

    struct Foo<'a> {
        a: PhantomData<&'a Bar>,
    }

    Actually, since it's going to need access to the source network to read weights and biases anyway, it might as well just contain a real reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions